Browse Source

do-agent: init at 3.5.6 (#69186)

do-agent: init at 3.5.6
openssl
Silvan Mosberger 2 years ago
committed by GitHub
parent
commit
643a329a4c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      maintainers/maintainer-list.nix
  2. 1
      nixos/modules/module-list.nix
  3. 34
      nixos/modules/services/monitoring/do-agent.nix
  4. 33
      pkgs/servers/monitoring/do-agent/default.nix
  5. 2
      pkgs/top-level/all-packages.nix

6
maintainers/maintainer-list.nix

@ -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";

1
nixos/modules/module-list.nix

@ -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

34
nixos/modules/services/monitoring/do-agent.nix

@ -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";
};
};
};
}

33
pkgs/servers/monitoring/do-agent/default.nix

@ -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;
};
}

2
pkgs/top-level/all-packages.nix

@ -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 { };

Loading…
Cancel
Save