mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
nixos datadog module: add processConfig option
This commit is contained in:
@@ -73,6 +73,7 @@ let
|
||||
nginxConfig = pkgs.writeText "nginx.yaml" cfg.nginxConfig;
|
||||
mongoConfig = pkgs.writeText "mongo.yaml" cfg.mongoConfig;
|
||||
jmxConfig = pkgs.writeText "jmx.yaml" cfg.jmxConfig;
|
||||
processConfig = pkgs.writeText "process.yaml" cfg.processConfig;
|
||||
|
||||
etcfiles =
|
||||
[ { source = ddConf;
|
||||
@@ -96,6 +97,10 @@ let
|
||||
{ source = mongoConfig;
|
||||
target = "dd-agent/conf.d/mongo.yaml";
|
||||
}) ++
|
||||
(optional (cfg.processConfig != null)
|
||||
{ source = processConfig;
|
||||
target = "dd-agent/conf.d/process.yaml";
|
||||
}) ++
|
||||
(optional (cfg.jmxConfig != null)
|
||||
{ source = jmxConfig;
|
||||
target = "dd-agent/conf.d/jmx.yaml";
|
||||
@@ -153,6 +158,16 @@ in {
|
||||
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 {
|
||||
@@ -179,7 +194,7 @@ in {
|
||||
Restart = "always";
|
||||
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 = {
|
||||
@@ -195,7 +210,7 @@ in {
|
||||
Restart = "always";
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user