NRPE and CHECK_MFI on FreeBSD
Posted: Thu Feb 27, 2020 7:26 pm
Have an old server running FreeBSD 8.1 with NRPE.
Running check_nrpe from NagiosXI server to both old and new:
Old server:
[root@nagiosxi]# /usr/local/nagios/libexec/check_nrpe -H 209.145.xx.xx -n
NRPE v2.12
New Server:
[root@nagiosxi]# /usr/local/nagios/libexec/check_nrpe -H 209.145.yy.yy -n
NRPE v3.2.1
They are Dell servers, using the MFI driver for file systems so am using the
check_mfi plugin.
check_mfi plugin requires sudo access for nagios. NRPE runs under the user:nagios
on both servers.
Added nagios to the sudoers on new server, setup NRPE.CFG same as old server, though
paths have changed between FBSD 8.1 and 11.3.
NRPE.CFG file for the check:
command[check_mfi]=/usr/local/libexec/nagios/check_mfi
This is the same on both servers, except for the path, which is different on the new machine.
Running check_nrpe from NagiosXI to both old and new:
Old server:
[root@nagios]# /usr/local/nagios/libexec/check_nrpe -H 209.145.xx.xx -t 30 -c check_mfi -n -2
OK: mfid0:33G:RAID-1:OPTIMAL mfid1:33G:RAID-1:OPTIMAL mfid2:33G:RAID-1:OPTIMAL mfid3:558G:RAID-5:OPTIMAL Drives:10
Testing New server:
[root@nagios]# /usr/local/nagios/libexec/check_nrpe -H 209.145.yy.yy -t 30 -c check_mfi -n -2
UNKNOWN: error: Could not execute sudo /usr/sbin/mfiutil -u 0 show volumes
Nagios sudoer is the same in both sudo files:
##NAGIOS SUDO User
nagios ALL=(ALL) NOPASSWD: /usr/sbin/mfiutil
Old server:
sudo -u nagios /usr/local/nagios/libexec/check_mfi
OK: mfid0:33G:RAID-1:OPTIMAL mfid1:33G:RAID-1:OPTIMAL mfid2:33G:RAID-1:OPTIMAL mfid3:558G:RAID-5:OPTIMAL Drives:10
New Server:
sudo -u nagios /usr/local/libexec/nagios/check_mfi
OK: mfid0:2235G:RAID-1:OPTIMAL Drives:0
I'm not sure what to else to check here. NRPE on both old and new are running under the nagios user though
the new server is quite a bit newer version of NRPE.
Might be related to the check_mfi plugin but not sure as it works locally.
Perl on old: 5.10.1 and new is 5.30.1
Might be sudo related but don't know enough about it to know for sure as this is the
only thing for which we use sudo.
Anyone have an idea on what to look at here? I'm sorta not sure where to look next.
I have had this running on the old server for near five years and have been alerted to
3 disk failures using this mechanism on this old server.
Thanks,
Keith
Running check_nrpe from NagiosXI server to both old and new:
Old server:
[root@nagiosxi]# /usr/local/nagios/libexec/check_nrpe -H 209.145.xx.xx -n
NRPE v2.12
New Server:
[root@nagiosxi]# /usr/local/nagios/libexec/check_nrpe -H 209.145.yy.yy -n
NRPE v3.2.1
They are Dell servers, using the MFI driver for file systems so am using the
check_mfi plugin.
check_mfi plugin requires sudo access for nagios. NRPE runs under the user:nagios
on both servers.
Added nagios to the sudoers on new server, setup NRPE.CFG same as old server, though
paths have changed between FBSD 8.1 and 11.3.
NRPE.CFG file for the check:
command[check_mfi]=/usr/local/libexec/nagios/check_mfi
This is the same on both servers, except for the path, which is different on the new machine.
Running check_nrpe from NagiosXI to both old and new:
Old server:
[root@nagios]# /usr/local/nagios/libexec/check_nrpe -H 209.145.xx.xx -t 30 -c check_mfi -n -2
OK: mfid0:33G:RAID-1:OPTIMAL mfid1:33G:RAID-1:OPTIMAL mfid2:33G:RAID-1:OPTIMAL mfid3:558G:RAID-5:OPTIMAL Drives:10
Testing New server:
[root@nagios]# /usr/local/nagios/libexec/check_nrpe -H 209.145.yy.yy -t 30 -c check_mfi -n -2
UNKNOWN: error: Could not execute sudo /usr/sbin/mfiutil -u 0 show volumes
Nagios sudoer is the same in both sudo files:
##NAGIOS SUDO User
nagios ALL=(ALL) NOPASSWD: /usr/sbin/mfiutil
Old server:
sudo -u nagios /usr/local/nagios/libexec/check_mfi
OK: mfid0:33G:RAID-1:OPTIMAL mfid1:33G:RAID-1:OPTIMAL mfid2:33G:RAID-1:OPTIMAL mfid3:558G:RAID-5:OPTIMAL Drives:10
New Server:
sudo -u nagios /usr/local/libexec/nagios/check_mfi
OK: mfid0:2235G:RAID-1:OPTIMAL Drives:0
I'm not sure what to else to check here. NRPE on both old and new are running under the nagios user though
the new server is quite a bit newer version of NRPE.
Might be related to the check_mfi plugin but not sure as it works locally.
Perl on old: 5.10.1 and new is 5.30.1
Might be sudo related but don't know enough about it to know for sure as this is the
only thing for which we use sudo.
Anyone have an idea on what to look at here? I'm sorta not sure where to look next.
I have had this running on the old server for near five years and have been alerted to
3 disk failures using this mechanism on this old server.
Thanks,
Keith