I’m using telegraf and have several modules configured without issues.
I do have issue with configuration of inputs.procstat.
- I had to first specifically request procps to be installed
- Then I’m getting error ‘> [inputs.procstat] Error in plugin: could not find pgrep binary: exec: “pgrep”: executable file not found in $PATH’
pgrep is installed (explicitely by procps) but is not listed in the PATH in /nix/store/HASH-system-units/telegraf.service, [Service], Environment.
I’m using
- nixos-version: 23.05.3580.5d017a8822e0 (Stoat)
- telegraf-1.26.2, I believe
Do I understand it right that
- it should not be required for me to request installation of procps but that that should be done automatically once you request inputs.procstat module?
- pgrep should be included in the PATH as well?
Anyway, how can I add pgrep’s path to PATH?
Bard is suggesting the following which does not work:
services.telegraf.serviceConfig.Environment = {
PATH = “${systemd.services.telegraf.serviceConfig.Environment.PATH}//:/run/current-system/sw/bin”;
};
and neither does
services.telegraf.serviceConfig.Environment = {
PATH = “${services.telegraf.serviceConfig.Environment.PATH}//:/run/current-system/sw/bin”;
};