This should go to Nagios plugins forum
This plugins check the swap only on localhost. Are you trying to check it on remote host? If so, then use nrpe to check it on remote host…
What distribution of linux do you use?
This is on Solaris, and on the localhost. I have not configure any clients yet.
This is just on the main Nagios server. I just finished compiling Nagios and
the plugins on the main server. Everything looks good except the check_swap
command.
Oh, sorry, you have mentioned the Solaris in the subject.
I have found several info about check_swap doesn’t work on Solaris 9. Although changelog says the plugin works with Solaris from version 1.4.6 of nagios-plugins
So if you’re using version lower then that, do an upgrade
Check this conversation. It seems something is wrong with this plugin and Solaris. What you could do is to test the plugin from the version 1.4.6: downloads.sourceforge.net/nagios … g_mirror=0
and only compile the check_swap and check if it works.
Or final solution is what was alredy said in the discussion in the above link, to write your own shell script that would be a plugin instead of check_swap.
This plugins check the swap only on localhost. Are you trying to check it on remote host? If so, then use nrpe to check it on remote host…
What distribution of linux do you use?
Thanks for the script. I implemented this on monitoring for my local Solaris Nagios server successfully. But, when I try to monitor it the same way with a remote machine it will not work with check_by_ssh. The check_by_ssh works great with everything else for me.
Example output:
FROM NAGIOS HOST:
bash-3.00$ ./check_by_ssh -H ABC123 -E 16 -C "/opt/nagios/libexec/check_solaris_swap 100000 50000"
WARNING - check_by_ssh: Remote command ‘/opt/nagios/libexec/check_solaris_swap 100000 50000’ returned status 1
IF I RUN IT FROM THE ABC123 HOST:
nagios@ABC123:~
$ /opt/nagios/libexec/check_solaris_swap 100000 50000
OK - 16355720 kbytes swap available