Event Handlers
Andy Shellam (Mailing Lists)
andy.shellam-lists at mailnetwork.co.uk
Fri Jan 19 14:56:26 CET 2007
Are event handlers enabled for this service?
Do they show up as executed in the log file when your HTTP service goes
down?
edalB wrote:
> Hi all.
>
> I have created a event handler as a test to see how it works. The hard
> part I have done.
>
> I created a ssh key on on the nagios server. I tested that I am able
> to connect via ssh over to the other server working 100% fine.
>
> I then next tested my ssh connection using my ssh key to execute the
> sudo apache2 restart on the other server all worked 100%.
>
> So in thury all is working nicely from command line.
>
> The command line command I am using is.
>
> /usr/bin/ssh -p 222 -i /home/nagios/.ssh/id_dsa user at server sudo
> /etc/init.d/apache2 restart
>
> So what I did was I then added a extra line in my host
>
> define service{
> use local-service
>
> host_name imap-1.rba.ispafrica.net
> service_description HTTP
> event_handler restart-httpd
> check_command check_http
> }
>
> And the command
>
>
> define command{
> command_name restart-httpd
> command_line /usr/bin/ssh -p 222 -i
> /home/nagios/.ssh/id_dsa eugene at imap-1.rba.ispafrica.net sudo
> /etc/init.d/apache2 res
> tart
> }
>
> So now nagios still does not want to execute my command
>
> Any advice would be appriciated.
>
> Thanks
>
> -------------------------------------------------------------------------
> 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
>
> !DSPAM:37,45b0cbd1137101304915882!
>
>
>
--
Andy Shellam
NetServe Support Team
the Mail Network
"an alternative in a standardised world"
p: +44 (0) 121 288 0832/0839
m: +44 (0) 7818 000834
-------------------------------------------------------------------------
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