eventhandler issue

Andrew Cruse andrew at profitability.net
Wed Nov 30 19:00:50 CET 2005


Does the Nagios user have execute permissions on restart-httpd?  Does
the Nagios user have enough permissions to execute the commands
contained in restart-httpd to restart Apache?

Andrew

nagios-users-admin at lists.sourceforge.net wrote:
> So I setup eventhandler for one of my servers similar to the
> write up on the nagios site.
> 
> I see the eventhandler is triggered in nagios.log.
> 
> "[1133367310] SERVICE EVENT HANDLER:
> ice.asdf.com;HTTP;CRITICAL;HARD;3;restart-httpd"
> 
> however, the restart-httpd is not triggered.
> 
> so then I ran the script via the command line:
> ./restart-httpd CRITICAL SOFT 3
> 
> the script works.
> 
> my check_commands.cfg:
> define command{
> command_name restart-httpd
> command_line
> /usr/local/nagios/libexec/eventhandlers/restart-httpd
> $SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$ }
> 
> my services.cfg
> define service{
> use generic-service
> host_name ice.asdf.com
> service_description HTTP
> is_volatile 0
> check_period 24x7
> max_check_attempts 3
> normal_check_interval 5
> retry_check_interval 1
> contact_groups on-call
> notification_interval 1
> notification_period 24x7
> notification_options c,r
> check_command check_http!80
> event_handler restart-httpd
> }
> 
> 
> can anyone offer an explanation on why it looks like the
> event trigger is being triggered but the $SERVICESTATE$
> $STATETYPE$ $SERVICEATTEMPT$ is not being sent to the script..
> 
> what else should I be looking at..?
> 
> thanks in advance.
> 
> 
> 
> __________________________________
> Start your day with Yahoo! - Make it your home page!
> http://www.yahoo.com/r/hs 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> 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 




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
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