nixos datadog module: add processConfig option
This commit is contained in:
parent
bad72e972d
commit
14f5a3d760
@ -73,6 +73,7 @@ let
|
|||||||
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;
|
||||||
|
|
||||||
etcfiles =
|
etcfiles =
|
||||||
let
|
let
|
||||||
@ -101,6 +102,10 @@ let
|
|||||||
{ source = mongoConfig;
|
{ source = mongoConfig;
|
||||||
target = "dd-agent/conf.d/mongo.yaml";
|
target = "dd-agent/conf.d/mongo.yaml";
|
||||||
}) ++
|
}) ++
|
||||||
|
(optional (cfg.processConfig != null)
|
||||||
|
{ source = processConfig;
|
||||||
|
target = "dd-agent/conf.d/process.yaml";
|
||||||
|
}) ++
|
||||||
(optional (cfg.jmxConfig != null)
|
(optional (cfg.jmxConfig != null)
|
||||||
{ source = jmxConfig;
|
{ source = jmxConfig;
|
||||||
target = "dd-agent/conf.d/jmx.yaml";
|
target = "dd-agent/conf.d/jmx.yaml";
|
||||||
@ -158,6 +163,16 @@ in {
|
|||||||
type = types.uniq (types.nullOr types.string);
|
type = types.uniq (types.nullOr types.string);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
processConfig = mkOption {
|
||||||
|
description = ''
|
||||||
|
Process integration configuration
|
||||||
|
|
||||||
|
See http://docs.datadoghq.com/integrations/process/
|
||||||
|
'';
|
||||||
|
default = null;
|
||||||
|
type = types.uniq (types.nullOr types.string);
|
||||||
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
@ -184,7 +199,7 @@ in {
|
|||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
};
|
};
|
||||||
restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig ];
|
restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig processConfig ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.dogstatsd = {
|
systemd.services.dogstatsd = {
|
||||||
@ -200,7 +215,7 @@ in {
|
|||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = 2;
|
RestartSec = 2;
|
||||||
};
|
};
|
||||||
restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig ];
|
restartTriggers = [ pkgs.dd-agent ddConf diskConfig networkConfig postgresqlConfig nginxConfig mongoConfig jmxConfig processConfig ];
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.dd-jmxfetch = lib.mkIf (cfg.jmxConfig != null) {
|
systemd.services.dd-jmxfetch = lib.mkIf (cfg.jmxConfig != null) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user