commit
643a329a4c
@ -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";
|
||||
|
@ -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
Normal file
34
nixos/modules/services/monitoring/do-agent.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
33
pkgs/servers/monitoring/do-agent/default.nix
Normal file
33
pkgs/servers/monitoring/do-agent/default.nix
Normal 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;
|
||||
};
|
||||
}
|
@ -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…
Reference in New Issue
Block a user