Skip to content

Commit 50f53da

Browse files
committedJun 2, 2017
datadog: Properly use configured package.
1 parent b829bdc commit 50f53da

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎nixos/modules/services/monitoring/dd-agent/dd-agent.nix

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let
2323
etcfiles =
2424
map (i: { source = if builtins.hasAttr "config" i
2525
then pkgs.writeText "${i.name}.yaml" i.config
26-
else "${pkgs.dd-agent}/agent/conf.d-system/${i.name}.yaml";
26+
else "${cfg.agent}/agent/conf.d-system/${i.name}.yaml";
2727
target = "dd-agent/conf.d/${i.name}.yaml";
2828
}
2929
) cfg.integrations ++
@@ -119,21 +119,21 @@ in {
119119
path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps ];
120120
wantedBy = [ "multi-user.target" ];
121121
serviceConfig = {
122-
ExecStart = "${pkgs.dd-agent}/bin/dd-agent foreground";
122+
ExecStart = "${cfg.agent}/bin/dd-agent foreground";
123123
User = "datadog";
124124
Group = "datadog";
125125
Restart = "always";
126126
RestartSec = 2;
127127
};
128-
restartTriggers = [ pkgs.dd-agent ddConf ] ++ etcSources;
128+
restartTriggers = [ cfg.agent ddConf ] ++ etcSources;
129129
};
130130

131131
systemd.services.dd-jmxfetch = lib.mkIf (builtins.any (i: i.name == "jmx") cfg.integrations) {
132132
description = "Datadog JMX Fetcher";
133133
path = [ cfg.agent pkgs.python pkgs.sysstat pkgs.procps pkgs.jdk ];
134134
wantedBy = [ "multi-user.target" ];
135135
serviceConfig = {
136-
ExecStart = "${pkgs.dd-agent}/bin/dd-jmxfetch";
136+
ExecStart = "${cfg.agent}/bin/dd-jmxfetch";
137137
User = "datadog";
138138
Group = "datadog";
139139
Restart = "always";

‎pkgs/tools/networking/dd-agent/default.nix

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# wrapper with their PYTHONPATH. This means overrideAttrs is not
66
# strong enough (it overrides too late), we need to call it
77
# beforehand.
8-
, extraBuildInputs ? [ pythonPackages.psutil ] }:
Has conversations. Original line has conversations.
8+
, extraBuildInputs ? [ ] }:
99
let
1010
inherit (pythonPackages) python;
1111
docker_1_10 = pythonPackages.buildPythonPackage rec {

0 commit comments

Comments
 (0)
Please sign in to comment.