There are two hosts, host1 and host2. On both the hosts, swap is not configured.
on host1, we have configured swap with the following command. Irrespective of the swap value and threshold values, it will show OK
/usr/lib/nagios/plugins/check_swap -w 20 -c 10 -n OK
SWAP OK - 0% free (0 MB out of 0 MB) - Swap is either disabled, not present, or of zero size. |swap=0MB;0;0;0;0
on host2, the same command is giving error.
/usr/lib64/nagios/plugins/check_swap -w 20 -c 10 -n OK
/usr/lib64/nagios/plugins/check_swap: invalid option -- 'n'
Usage:
check_swap [-av] -w <percent_free>% -c <percent_free>%
-w <bytes_free> -c <bytes_free>
This is because, nrpe version is different on both the hosts.
[root@nagios libexec]# ./check_nrpe -H host1
NRPE v3.2.1
[root@nagios libexec]# ./check_nrpe -H host2
NRPE v3.2.0
Can we upgrade NRPE from 3.2.0 to 3.2.1 on host2. If yes, let me know the procedure.