thanx Thomas <span style="font-weight: bold;"></span><span class="gmail_quote"><b class="gmail_sendername"> </b></span>for
your reply.But the script writing nagios.cmd is
/usr/lib/nagios/plugins/eventhandlers/submit_check_result,it's writing
it just as you said i.e."
PROCESS_SERVICE_CHECK_RESULT;winnt_host;TRAP;1;TRAP RECEIVED;".<br>
I just made a typing mistake in the query :( .<br>
<br>
The case happening here is that the configured nagios is not executing
the entries in the nagios.cmd,though the respective conf in nagios.cfg
is---<br>
check_external_commands=1<br>
command_check_interval=1<br>
command_file=/usr/local/nagios/var/rw/nagios.cmd<br>
--- <br>
looking fwd for ur thoughts,<br>
nKaranUk<br><br><div><span class="gmail_quote">On 12/16/05, <b class="gmail_sendername"><a href="mailto:Thomas.Zimmer@oppenheim.de">Thomas.Zimmer@oppenheim.de</a></b> <<a href="mailto:Thomas.Zimmer@oppenheim.de">Thomas.Zimmer@oppenheim.de
</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><font color="#0000ff" face="Arial" size="2"><span>Hi,</span></font></div>
<div><font color="#0000ff" face="Arial" size="2"><span>i
think you are not using the right syntax for the nagios.cmd file ("<font color="#000000" face="Times New Roman" size="3">1 PROCESS_SERVICE_CHECK_RESULT
:winnt_host:TRAP:1:Trap received<font color="#0000ff">")</font></font></span></font></div>
<div><font color="#0000ff"><span>It should
be:</span></font></div>
<div><br><font color="#0000ff" face="Arial" size="2">now=`date
+%s`<br>commandfile='/usr/local/nagios/var/rw/nagios.cmd'</font></div>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div><font color="#0000ff" face="Arial" size="2">/bin/printf "[%lu]
PROCESS_SERVICE_CHECK_RESULT;host1;service1;0;OK- Everything Looks Great\n" $now
> $commandfile</font></div>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div><span><font color="#0000ff" face="Arial" size="2">See <a href="http://www.nagios.org/developerinfo/externalcommands/commandlist.php" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.nagios.org/developerinfo/externalcommands/commandlist.php
</a> for
all commands.</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">Greetz,</font></span></div>
<div><span lang="de"><b><font face="Arial" size="1">Thomas Zimmer</font></b></span>
<br><span lang="de"><font face="Arial" size="1">Produktservice &
Betrieb</font></span> <br><span lang="de"><font face="Arial" size="1">Betrieb &
Support</font></span> <br><span lang="de"><font face="Arial" size="1">Sal. Oppenheim
jr. & Cie., Frankfurt a. Main</font></span> <br><span lang="de"><font face="Arial" size="1">Telefon: +49 69 7134 0 5192</font></span> <br><span lang="de"><font face="Arial" size="1">Internet: <a href="http://www.oppenheim.de/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.oppenheim.de</a></font></span>
<br><span lang="de"><font color="#000000" face="Arial" size="1">E-Mail:
<a href="mailto:thomas.zimmer@oppenheim.de" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">thomas.zimmer@oppenheim.de</a></font></span> </div>
<blockquote style="margin-right: 0px;">
<div></div>
<div align="left" dir="ltr" lang="de"><font face="Tahoma" size="2">-----Ursprüngliche Nachricht-----<br><b>Von:</b>
<a href="mailto:nagios-users-admin@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-admin@lists.sourceforge.net</a>
[mailto:<a href="mailto:nagios-users-admin@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users-admin@lists.sourceforge.net</a>] <b>Im Auftrag von </b>Karan
uk<br><b>Gesendet:</b> Freitag, 16. Dezember 2005 08:26<br><b>An:</b>
<a href="mailto:nagios-users@lists.sourceforge.net" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">nagios-users@lists.sourceforge.net</a><br><b>Betreff:</b> [Nagios-users] JMX
notifications->snmptrapd->snmptt->Nagios
Configuation<br><br></font></div><div><span class="e" id="q_108327f6b4a3adac_1">Hello, <br>I was looking to configure Nagios
so that it can accept SNMP traps(JMX notification thru snmptrapd->snmptt)
and send e-mail. <br>As per the doc's i've got snmptrapd writing the
nagios.cmd file.But configured Nagios seems to not react to the
PROCESS_SERVICE_CHECK_RESULT entries in the command file. <br>The
configuration files i'm using are as bellow.Do let me know if i'm missing
something in the conf. or the way to make nagios execute nagios.cmd entries.
<br>Nagios Version 1.3 <br>nagios.cmd-- <br>1 PROCESS_SERVICE_CHECK_RESULT
:winnt_host:TRAP:1:Trap received <br><br>Respective conf in nagios.cfg---
<br>check_external_commands=1 <br>command_check_interval=1
<br>command_file=/usr/local/nagios/var/rw/nagios.cmd <br>---
<br>services.cfg-- <br>define service{ <br>use generic-service <br>e template
to use <br><br>host_name winnt_host <br>service_description TRAP
<br>is_volatile 0 <br>check_period 24x7 <br>max_check_attempts 3
<br>normal_check_interval 5 <br>retry_check_interval 1
<br>active_checks_enabled 0 <br>passive_checks_enabled 1 <br>contact_groups
nt-admins <br>notification_interval 120 <br>notification_period 24x7
<br>notification_options w,u,c,r <br>check_command check-host-alive <br>}
<br>---------- <br>snmptt.ini--- <br>dns_enable = 0 <br>strip_domain = 0
<br>net_snmp_perl_enable = 0 <br>translate_value_oids = 0
<br>translate_enterprise_oid_format = 1 <br>----------
<br>snmptrapd.conf------- <br>traphandle default /usr/sbin/snmptt
<br>------------- <br><br>thanks in advance, <br>nkaranuk
</span></div></blockquote>
<br clear="all"></blockquote></div><br>