[Help] Fix NRPE: Command 'check_swap' not defined
Posted: Thu Dec 19, 2019 11:34 pm
Hi everyone,
I'm sorry for my bad english.
My problem: I have 5 server linux, I already install "nagios-plugins-all nagios-plugins-nrpe nrpe" and config nagios on /etc/nagios/nrpe.cfg
Only 2 Server have check_swap working
But last 3 server get error with check_swap
CRITICAL 12-20-2019 04:17:20 0d 2h 12m 11s 3/3 NRPE: Command 'check_swap' not defined
I try fix: Update nagios plugin, change URL plugin from /usr/lib64/nagios/plugins/ to /usr/local/nagios/libexec/ but still not work. I try go forum and read many post but can not fix it.
Please, anyone can help me to fix that problem, thank you.
Have a nice day,
=================================================================================
Thanks to @scottwilkerson for help me fix it,
I'm sorry for my bad english.
My problem: I have 5 server linux, I already install "nagios-plugins-all nagios-plugins-nrpe nrpe" and config nagios on /etc/nagios/nrpe.cfg
Code: Select all
command[check_users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/lib64/nagios/plugins/check_disk -w 10% -c 5% -p /
command[check_hda2]=/usr/lib64/nagios/plugins/check_disk -w 15% -c 10% -p /mnt/data
command[check_zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 300 -c 350
command[check_swap]=/usr/lib64/nagios/plugins/check_swap -w 50% -c 30%
Code: Select all
CPU Load
OK 12-20-2019 04:16:13 10d 16h 19m 19s 1/3 OK - load average: 0.12, 0.21, 0.34
Check Disk_2
OK 12-20-2019 04:24:09 10d 16h 21m 23s 1/3 DISK OK - free space: /mnt/data 44034 MB (61% inode=97%):
Check Root Partition
OK 12-20-2019 04:16:25 10d 14h 39m 7s 1/3 DISK OK - free space: / 4805 MB (48% inode=82%):
Check Swap
OK 12-20-2019 04:15:40 10d 16h 19m 51s 1/3 SWAP OK - 100% free (5119 MB out of 5119 MB)
Check Zombies
OK 12-20-2019 04:24:07 10d 16h 21m 23s 1/3 PROCS OK: 0 processes with STATE = Z
Total Processes
OK 12-20-2019 04:18:14 10d 16h 17m 17s 1/3 PROCS OK: 101 processes
Users Load
OK 12-20-2019 04:15:46 10d 16h 19m 45s 1/3 USERS OK - 1 users currently logged in
CRITICAL 12-20-2019 04:17:20 0d 2h 12m 11s 3/3 NRPE: Command 'check_swap' not defined
Code: Select all
CPU Load
OK 12-20-2019 04:19:04 0d 2h 16m 27s 1/3 OK - load average: 0.18, 0.14, 0.16
Check Disk_2
OK 12-20-2019 04:20:29 0d 2h 15m 2s 1/3 DISK OK - free space: /mnt/data 50892 MiB (71.06% inode=96%):
Check Root Partition
OK 12-20-2019 04:21:55 0d 2h 13m 36s 1/3 DISK OK - free space: / 9781 MiB (32.59% inode=94%):
Check Swap
CRITICAL 12-20-2019 04:17:20 0d 2h 12m 11s 3/3 NRPE: Command 'check_swap' not defined
Check Zombies
OK 12-20-2019 04:24:46 0d 2h 10m 45s 1/3 PROCS OK: 0 processes with STATE = Z
Total Processes
OK 12-20-2019 04:16:11 0d 2h 9m 20s 1/3 PROCS OK: 145 processes
Users Load
OK 12-20-2019 04:17:37 0d 2h 7m 54s 1/3 USERS OK - 1 users currently logged in
Please, anyone can help me to fix that problem, thank you.
Have a nice day,
=================================================================================
Thanks to @scottwilkerson for help me fix it,
scottwilkerson wrote:Ok, you were making edits to /etc/nagios/nrpe.cfg but NRPE is running under xinetd using /usr/local/nagios/etc/nrpe.cfg
Maike your changes in /usr/local/nagios/etc/nrpe.cfg then restart xinetd