Monitoring question

Andy Shellam (Mailing Lists) andy.shellam-lists at mailnetwork.co.uk
Wed Jan 17 19:47:32 CET 2007


Formoso, Travis wrote:
>>> I shut down the httpd - however the service did not restart auto -
>>>       
> so
>   
>> the handler is not working. Any thing I can try or did wrong?
>>     
>> Have you tried running the "restart-httpd" command as the Nagios user
>> from the console?
>>     
>
> Always a good suggestion.
>
> I never was able to run anything as the Nagios user. I tried to su nagios and got: The account is currently not available.
>   
If your Nagios user's shell is set to /sbin/nologin (good practice) 
that's why.  So use "sudo" not "su."  You need to be reading your 
Operating System's "sudo" and "sudoers" man page to learn how to grant 
passwordless access to a user to run commands - the default 
"/etc/sudoers" file has an example of how to do this. 

You will need to add "sudo" at the beginning of your command in Nagios - 
e.g. "sudo /usr/local/nagios/libexec/eventhandler......"
> I ran ./check-httpd as root and when I typed that in - nothing happened.
>   
The command is usually "check_http" and requires the relevant parameters 
(website address to check, status code to cause an error on etc.)
It's basically checking to see that a visitor to a website would get a 
"valid" http response from your server - if httpd is not running, this 
won't happen and the Nagios check will fail.

Run "/usr/local/nagios/libexec/check_http -h" for more info (substitute 
Nagios plugins path as appropriate.)

-------------------------------------------------------------------------
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 at 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





More information about the Users mailing list