<P>Not sure if you really want; (not sure what event_handler does)
<P> <FONT face=Tahoma>event_handler<SPAN style="mso-spacerun: yes">                   </SPAN><SPAN style="mso-tab-count: 1"></SPAN>restart-daemon</FONT>
<P>Try;
<P> check_command         <FONT face=Tahoma>restart-daemon</FONT>
<P> <B><I>Mohammad Ghaeini <mohammad@cerberian.com></I></B> wrote:
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content=Word.Document name=ProgId>
<META content="Microsoft Word 10" name=Generator>
<META content="Microsoft Word 10" name=Originator><LINK href="cid:filelist.xml@01C27E8B.6BEDB690" rel=File-List>
<STYLE>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:553679495 -2147483648 8 0 66047 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0in;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
span.GramE
        {mso-style-name:"";
        mso-gram-e:yes;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;
        mso-header-margin:.5in;
        mso-footer-margin:.5in;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
-->
</STYLE>

<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I get an error in setting up the following event handler service.<SPAN style="mso-spacerun: yes">  </SPAN>Here is my setup:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Service.cfg:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">define service{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>use<SPAN style="mso-spacerun: yes">                             </SPAN>generic-service<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>host_name<SPAN style="mso-spacerun: yes">                       </SPAN>devlinux<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>service_description<SPAN style="mso-spacerun: yes">            </SPAN>TESTD<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>is_volatile<SPAN style="mso-spacerun: yes">                     </SPAN><SPAN style="mso-tab-count: 1">     </SPAN>0<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>check_period<SPAN style="mso-spacerun: yes">                    </SPAN>workhours<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>max_check_attempts<SPAN style="mso-spacerun: yes">          </SPAN>4<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>normal_check_interval<SPAN style="mso-spacerun: yes">         </SPAN>5<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>retry_check_interval<SPAN style="mso-spacerun: yes">            </SPAN>1<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>event_handler<SPAN style="mso-spacerun: yes">                   </SPAN><SPAN style="mso-tab-count: 1"></SPAN>restart-daemon<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><SPAN style="mso-spacerun: yes">        </SPAN>}<BR style="mso-special-character: line-break"><BR style="mso-special-character: line-break"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">misccommands.cfg:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">define command{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">        </SPAN>command_name<SPAN style="mso-spacerun: yes">    </SPAN>restart-daemon<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">        </SPAN>command_line<SPAN style="mso-spacerun: yes">    </SPAN>/usr/local/nagios/libexec/eventhandlers/restart-daemon<SPAN style="mso-spacerun: yes">  </SPAN>$SERVICESTATE$ $STATETYPE$ $SERVICEATTEMPT$<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes">        </SPAN>}<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">nagios –v nagios.cfg results:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Error: Service description, host name, or check command is NULL<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Error: Could not register service (config file '/usr/local/nagios/etc/services.cfg', line 402)<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Where line 402 begins with:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 0.5in"><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">define service{<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">of the TESTD service, as described above.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Tahoma">What am I missing?</SPAN></FONT><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Thanks in advance.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">-M.<o:p></o:p></SPAN></FONT></P></DIV></BLOCKQUOTE><p><br><hr size=1>Do you Yahoo!?<br>
<a href="http://webhosting.yahoo.com/ ">Y! Web Hosting</a> - Let the expert host your web site