do-agent: init at 3.5.6 (#69186)

do-agent: init at 3.5.6
This commit is contained in:
Silvan Mosberger 2019-10-02 22:34:26 +02:00 committed by GitHub
commit 643a329a4c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 0 deletions

View file

@ -7140,6 +7140,12 @@
githubId = 1866448;
name = "Eric Bailey";
};
yvt = {
email = "i@yvt.jp";
github = "yvt";
githubId = 5253988;
name = "yvt";
};
z77z = {
email = "maggesi@math.unifi.it";
github = "maggesi";

View file

@ -503,6 +503,7 @@
./services/monitoring/das_watchdog.nix
./services/monitoring/datadog-agent.nix
./services/monitoring/dd-agent/dd-agent.nix
./services/monitoring/do-agent.nix
./services/monitoring/fusion-inventory.nix
./services/monitoring/grafana.nix
./services/monitoring/grafana-reporter.nix

View file

@ -0,0 +1,34 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.do-agent;
in
{
options.services.do-agent = {
enable = mkEnableOption "do-agent, the DigitalOcean droplet metrics agent";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.do-agent ];
systemd.services.do-agent = {
description = "DigitalOcean Droplet Metrics Agent";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
serviceConfig = {
ExecStart = "${pkgs.do-agent}/bin/do-agent --syslog";
Restart = "always";
OOMScoreAdjust = -900;
SyslogIdentifier = "DigitalOceanAgent";
PrivateTmp = "yes";
ProtectSystem = "full";
ProtectHome = "yes";
NoNewPrivileges = "yes";
DynamicUser = "yes";
};
};
};
}

View file

@ -0,0 +1,33 @@
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "do-agent";
version = "3.5.6";
src = fetchFromGitHub {
owner = "digitalocean";
repo = "do-agent";
rev = "${version}";
sha256 = "1gl034cslqa30fqy2p9rymgx398s1rcgbmfvzk5zjlrw47327k8i";
};
buildFlagsArray = ''
-ldflags=
-X main.version=${version}
'';
modSha256 = "164bwqg996097db399j7lar6gj9xpshjdmyapvzg7zh655xlkf3d";
meta = with lib; {
description = "DigitalOcean droplet system metrics agent";
longDescription = ''
do-agent is a program provided by DigitalOcean that collects system
metrics from a DigitalOcean Droplet (on which the program runs) and sends
them to DigitalOcean to provide resource usage graphs and alerting.
'';
homepage = https://github.com/digitalocean/do-agent;
license = licenses.asl20;
maintainers = with maintainers; [ yvt ];
platforms = platforms.linux;
};
}

View file

@ -14650,6 +14650,8 @@ in
dkimproxy = callPackage ../servers/mail/dkimproxy { };
do-agent = callPackage ../servers/monitoring/do-agent { };
dovecot = callPackage ../servers/mail/dovecot { };
dovecot_pigeonhole = callPackage ../servers/mail/dovecot/plugins/pigeonhole { };