Date: Sun, 30 Sep 2018 16:43:10 +0200 From: Andrea Venturoli <ml@netfence.it> To: sergey_zaikov@rambler.ru Cc: freebsd-ports@freebsd.org Subject: Problem with net-mgmt/check_ipmi_sensor Message-ID: <710f3790-3970-e41f-ce9a-a84db0ba0e71@netfence.it>
next in thread | raw e-mail | index | archive | help
Hello. I've got a problem with this port: I'm running it from a Nagios instance on another host (through NRPE3) and I need sudo to do this, as NRPE3 will run as user nagios. Now: _ running "/usr/local/libexec/nagios/check_ipmi_sensor" as root works; _ running "/usr/local/bin/sudo /usr/local/libexec/nagios/check_ipmi_sensor" as user nagios works; _ running "/usr/local/libexec/nagios/check_nrpe3 -n -H xxx -c check_ipmi" (which runs the above command remotely) does not work. I pinpointed it to this code: > > sub get_sel{ > my @selcmd = @{(shift)}; > my $verbosity = shift; > my $sel; > if(-e '/usr/sbin/ipmi-sel'){ > $sel = '/usr/sbin/ipmi-sel'; > } > else{ > chomp($sel = `which ipmi-sel`); > } Of course we don't have /usr/sbin/ipmi-sel, but /usr/local/sbin/ipmi-sel, so we end up in the else clause, but $sel is empty after this line if (and only if) this script is called from NRPE3. I don't know PERL at all, so I solved by just hardcoding the correct path in my script. This is just to let you know :) bye & Thanks av.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?710f3790-3970-e41f-ce9a-a84db0ba0e71>