nixos/dd-agent: fix runtime errors by adding gohai to $PATH
The Datadog agent requires `gohai` to be available on its `$PATH` in order to collect certain metrics. It would previously start up and collect certain types of metrics, but log errors related to the missing gohai binary. This commit configures the systemd-unit to make gohai available at runtime. This fixes #39810.
This commit is contained in:
parent
ab500439cd
commit
f4c87183df
@ -57,7 +57,7 @@ let
|
|||||||
instances:
|
instances:
|
||||||
- use_mount: no
|
- use_mount: no
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networkConfig = pkgs.writeText "network.yaml" ''
|
networkConfig = pkgs.writeText "network.yaml" ''
|
||||||
init_config:
|
init_config:
|
||||||
|
|
||||||
@ -68,13 +68,13 @@ let
|
|||||||
- lo
|
- lo
|
||||||
- lo0
|
- lo0
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postgresqlConfig = pkgs.writeText "postgres.yaml" cfg.postgresqlConfig;
|
postgresqlConfig = pkgs.writeText "postgres.yaml" cfg.postgresqlConfig;
|
||||||
nginxConfig = pkgs.writeText "nginx.yaml" cfg.nginxConfig;
|
nginxConfig = pkgs.writeText "nginx.yaml" cfg.nginxConfig;
|
||||||
mongoConfig = pkgs.writeText "mongo.yaml" cfg.mongoConfig;
|
mongoConfig = pkgs.writeText "mongo.yaml" cfg.mongoConfig;
|
||||||
jmxConfig = pkgs.writeText "jmx.yaml" cfg.jmxConfig;
|
jmxConfig = pkgs.writeText "jmx.yaml" cfg.jmxConfig;
|
||||||
processConfig = pkgs.writeText "process.yaml" cfg.processConfig;
|
processConfig = pkgs.writeText "process.yaml" cfg.processConfig;
|
||||||
|
|
||||||
etcfiles =
|
etcfiles =
|
||||||
let
|
let
|
||||||
defaultConfd = import ./dd-agent-defaults.nix;
|
defaultConfd = import ./dd-agent-defaults.nix;
|
||||||
@ -150,7 +150,7 @@ in {
|
|||||||
default = null;
|
default = null;
|
||||||
type = types.uniq (types.nullOr types.string);
|
type = types.uniq (types.nullOr types.string);
|
||||||
};
|
};
|
||||||
|
|
||||||
mongoConfig = mkOption {
|
mongoConfig = mkOption {
|
||||||
description = "MongoDB integration configuration";
|
description = "MongoDB integration configuration";
|
||||||
default = null;
|
default = null;
|
||||||
@ -166,7 +166,7 @@ in {
|
|||||||
processConfig = mkOption {
|
processConfig = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Process integration configuration
|
Process integration configuration
|
||||||
|
|
||||||
See http://docs.datadoghq.com/integrations/process/
|
See http://docs.datadoghq.com/integrations/process/
|
||||||
'';
|
'';
|
||||||
default = null;
|
default = null;
|
||||||
@ -190,7 +190,7 @@ in {
|
|||||||
|
|
||||||
systemd.services.dd-agent = {
|
systemd.services.dd-agent = {
|
||||||
description = "Datadog agent monitor";
|
description = "Datadog agent monitor";
|
||||||
path = [ pkgs."dd-agent" pkgs.python pkgs.sysstat pkgs.procps ];
|
path = [ pkgs."dd-agent" pkgs.python pkgs.sysstat pkgs.procps pkgs.gohai ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
|
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user