telegraf supports gathering stats from fail2ban via fail2ban-client, which is installed in /usr/local/bin. Since /usr/local/bin is not in the PATH set by rc. A log entry such as below is generated in /var/log/telegraf.log 2018-01-24T22:53:00Z E! Error in plugin [inputs.fail2ban]: fail2ban-client not found: verify that fail2ban is installed and that fail2ban-client is in your PATH I have fixed this by adding "PATH=${PATH}:/usr/local/bin" to /etc/rc.conf, but it seems more appropriate that this is in the telegraf rc script.
Hi, That just half the story. From what I can see, the executable is not named fail2ban-client but actually fail2ban-python? But I guess that's beside the point. If the executable is installed, it should be found. Reasonable. Just curious, though, which port supplies the fail2ban-client executable? Palle
I installed py27-fail2ban via pkg. I use "latest" with my pkg config and currently have fail2ban version 0.10.1_1. % pkg info -l py27-fail2ban py27-fail2ban-0.10.1_1: /usr/local/bin/fail2ban-client /usr/local/bin/fail2ban-python /usr/local/bin/fail2ban-regex /usr/local/bin/fail2ban-server .... % find /usr/local/bin -name fail2ban\* /usr/local/bin/fail2ban-regex /usr/local/bin/fail2ban-server /usr/local/bin/fail2ban-python /usr/local/bin/fail2ban-client I'm assuming the py36-fail2ban package does the same thing, but I've not checked it. Thanks for maintaining this port. On a side note, I put in a request for telegraf to also report wired memory (request 3628) which is in their head now and looks like its slated to go in the 1.6 release.
I have also just run into the similar problem with the smart input (for smartmontool). smartctl is in /usr/local/sbin which telegraf can't find since it's not part of rc's default path.
A commit references this bug: Author: girgen Date: Sun Jan 28 10:54:47 UTC 2018 New revision: 460163 URL: https://svnweb.freebsd.org/changeset/ports/460163 Log: Add /usr/local/[s]bin to the path when running telegraf Submitted by: Chris Gordon PR: 225439 Changes: head/net-mgmt/telegraf/Makefile head/net-mgmt/telegraf/files/telegraf.in
Committed. Thanks!