I do this and it works fine.<br><br>But also I want to solve the problem with ePN because posibly in others cases I can't fix the problem in this way.<br><br>Thanks Dan<br><br><div class="gmail_quote">2011/2/7 Daniel Wittenberg <span dir="ltr"><<a href="mailto:daniel.wittenberg.r0ko@statefarm.com">daniel.wittenberg.r0ko@statefarm.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Add this to your script in the first 10 lines to keep epn from parsing:</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"># nagios: -epn</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Dan</span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;">
<p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> Juan-Francisco Diez [mailto:<a href="mailto:mochu33@gmail.com" target="_blank">mochu33@gmail.com</a>] <br><b>Sent:</b> Monday, February 07, 2011 4:29 AM<br>
<b>To:</b> <a href="mailto:nagios-users@lists.sourceforge.net" target="_blank">nagios-users@lists.sourceforge.net</a><br><b>Subject:</b> [Nagios-users] ePN Trouble</span></p></div><div><div></div><div class="h5"><p class="MsoNormal">
</p><p class="MsoNormal">Hi all,<br><br>I use a script to notify service problems. The script run well with perl but not with ePN. The error it sent to the /var/log/messages is:<br><br>nagios: **ePN failed to compile /usr/lib/nagios/eventhandlers/<a href="http://notify-service-by-email.pl" target="_blank">notify-service-by-email.pl</a>: "String found where operator expected at (eval 8) line 52, near "case "PROBLEM""" at /usr/bin/<a href="http://p1.pl" target="_blank">p1.pl</a> line 159.<br>
<br>In the script I use the Switch.pm to assign a different text depending on the notification type. The switch is like this:<br><br>switch ($optnotiftype) {<br> case "PROBLEM" { $NOTIFTYPE='Problem' }<br>
case "RECOVERY" { $NOTIFTYPE='Recovery' }<br> case "ACKNOWLEDGEMENT" { $NOTIFTYPE='Notification Acknowkedge' }<br> case "DOWNTIMESTART" { $NOTIFTYPE='Start of Planned Stop' }<br>
case "DOWNTIMEEND" { $NOTIFTYPE='End of Planned Stop' }<br> case "DOWNTIMECANCELLED" { $NOTIFTYPE='Planned Stop Canceled' }<br> else { $NOTIFTYPE=$optnotiftype }<br>
}<br><br>All the vars are defined and the script run OK with perl.<br><br>Can someone help me to fix this problem?</p></div></div></div></div><br>------------------------------------------------------------------------------<br>
The modern datacenter depends on network connectivity to access resources<br>
and provide services. The best practices for maximizing a physical server's<br>
connectivity to a physical network are well understood - see how these<br>
rules translate into the virtual world?<br>
<a href="http://p.sf.net/sfu/oracle-sfdevnlfb" target="_blank">http://p.sf.net/sfu/oracle-sfdevnlfb</a><br>_______________________________________________<br>
Nagios-users mailing list<br>
<a href="mailto:Nagios-users@lists.sourceforge.net">Nagios-users@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/nagios-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/nagios-users</a><br>
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.<br>
::: Messages without supporting info will risk being sent to /dev/null<br></blockquote></div><br>