On 27/02/07 08:29 AM, sujith h wrote: > Hi , > > Am using nagios for past 5 months. I have to monitor both the host and > its services of my client. > I had found that when i added a small plugin to monitor the host its not > giving me the proper > result. I wrote a 3 line code in a file called check_uptime: > #!/bin/bash > uptime > exit(0) > > > Now when I start the nagios it will work fine. But after some one or 2 > days it will start to give me > wrong output. The remaining plugins run fine.. So can anyone suggest > what is the problem??? > When I check the nagios for the configurations and all it gives me no > error and warning.
Hi Sujith, I this may seems obvious, but just to be sure, are you running check_uptime trough NRPE, check_by_ssh, or any other way to run checks on remote hosts? If you define a check in Nagios it will run locally. If the check has to run from a remote machine you have to run a special local check that will run the command on the remote host and return the result to Nagios. Another way to check uptime is by using check_snmp (you need a snmp daemon configured on the remote host). A command like this one will give you the same result without the need to run a command on the remote host (assuming $USER1$ is the path to Nagios-plugins and that the read community is 'public'): $USER1$/check_snmp -H $HOSTADDRESS$ -C public -o sysUpTime.0 You can also set thresholds (check_snmp --help for full usage text) so that you can page on hosts that recently rebooted. You can check many things trough SNMP, but for most advanced things you may need specific MIBs and SNMP agents. To see what's readily available run: snmpwalk -c public -m ALL <host> .1 Thomas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Nagios-users mailing list Nagios-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nagios-users ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null