<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content="MSHTML 6.00.6000.16608" name=GENERATOR></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>I am trying to use an event_handler to reatrt a process on a remote server. I use NRPE for this purpose.</DIV>
<DIV>The process works fine when I run the full check_nrpe command from the command line of the Nagios server:</DIV>
<DIV> </DIV>
<DIV>#./check_nrpe -H nnn.nn.nnn.nn -c restart_alert_agent_new -a CRITICAL SOFT 2<BR></DIV>
<DIV>However, the restart script on the remote server does not kick in when the alert is encountered by Nagios itself. Below is the command defined in misccommands.cfg:</DIV>
<DIV> </DIV>
<DIV>define command{<BR> command_name restart_alert_agent_new<BR> command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c restart_alert_agent_new -a $SERVICESTATE$ $SERVICESTATETYPE$ $SERVICEATTEMPT$<BR> }</DIV>
<DIV> </DIV>
<DIV>As mentioned, the restart script in the remote server works fine when invoked through the command line on Nagios server (above).</DIV>
<DIV>Below is the definition of the service in services.cfg:</DIV>
<DIV> </DIV>
<DIV># Service definition<BR>define service{<BR> use generic-service ; Name of service template to use</DIV>
<DIV> </DIV>
<DIV> host_name CHOCLX-INTTEST<BR> service_description check_total_procs<BR> is_volatile 0<BR> check_period 24x7<BR> max_check_attempts 4<BR> normal_check_interval 5<BR> retry_check_interval 2<BR> event_handler_enabled 1<BR> event_handler restart_alert_agent_new<BR> contact_groups sun-admins,lawson-admins,egate-admins<BR> notification_interval 240<BR> notification_period 24x7<BR> notification_options u,c<BR> notifications_enabled 1<BR> check_command check_nrpe!check_total_procs<BR> }<BR></DIV>
<DIV> </DIV>
<DIV>Thank you for your help.</DIV>
<DIV>Hendric Minassian</DIV>
<DIV> </DIV>
<P><pre wrap>"EMF <choc.org>" made the following annotations.
------------------------------------------------------------------------------
04/09/08, 15:51:44
This email message and any files transmitted are sent with confidentiality in mind
and contain privileged or copyright information. You must not present
this message to another party without gaining permission from the
sender. If you are not the intended recipient you must not copy,
distribute or use this email or the information contained in it
for any purpose other than to notify Children's Hospital of
Orange County. Any views expressed in this message are those of
the sender, except where the sender specifically states them to
be the views of Children's Hospital of Orange County. If you have
received this message in error, please notify the sender immediately,
and delete this email from your system. We do not guarantee that
this material is free from viruses or any other defects although
due care has been taken to minimize the risk.
==============================================================================
</pre></P></BODY></HTML>