datadog: Properly use configured package.

This commit is contained in:
Mateusz Kowalczyk 2017-06-02 07:50:41 +01:00
parent b829bdca1d
commit 50f53da9ef
2 changed files with 5 additions and 5 deletions

View file

@ -23,7 +23,7 @@ let
etcfiles =
map (i: { source = if builtins.hasAttr "config" i
then pkgs.writeText "${i.name}.yaml" i.config
else "${pkgs.dd-agent}/agent/conf.d-system/${i.name}.yaml";
else "${cfg.agent}/agent/conf.d-system/${i.name}.yaml";
target = "dd-agent/conf.d/${i.name}.yaml";
}
) cfg.integrations ++
@ -119,13 +119,13 @@ in {
path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
ExecStart = "${cfg.agent}/bin/dd-agent foreground";
User = "datadog";
Group = "datadog";
Restart = "always";
RestartSec = 2;
};
restartTriggers = [ pkgs.dd-agent ddConf ] ++ etcSources;
restartTriggers = [ cfg.agent ddConf ] ++ etcSources;
};
systemd.services.dd-jmxfetch = lib.mkIf (builtins.any (i: i.name == "jmx") cfg.integrations) {
@ -133,7 +133,7 @@ in {
path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps pkgs.jdk ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${pkgs.dd-agent}/bin/dd-jmxfetch";
ExecStart = "${cfg.agent}/bin/dd-jmxfetch";
User = "datadog";
Group = "datadog";
Restart = "always";

View file

@ -5,7 +5,7 @@
# wrapper with their PYTHONPATH. This means overrideAttrs is not
# strong enough (it overrides too late), we need to call it
# beforehand.
, extraBuildInputs ? [ pythonPackages.psutil ] }:
, extraBuildInputs ? [ ] }:
let
inherit (pythonPackages) python;
docker_1_10 = pythonPackages.buildPythonPackage rec {