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 [EMAIL PROTECTED] 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 [EMAIL PROTECTED] 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@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