Event Handlers

edalB edalb1979 at gmail.com
Fri Jan 19 15:05:02 CET 2007


I have it sent in my nagios.cfg as


enable_event_handlers=1

regards

On 1/19/07, Steve Barnes <barness at paynet.co.ke> wrote:
> event_handler_enabled = 1
>
> In the service definition?
>
> Steve
>
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of edalB
> Sent: 19 January 2007 16:46
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Event Handlers
>
> 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=DEVDE
> V
> _______________________________________________
> 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
>

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