ePN Trouble

Juan-Francisco Diez mochu33 at gmail.com
Mon Feb 7 17:13:56 CET 2011


I do this and it works fine.

But also I want to solve the problem with ePN because posibly in others
cases I can't fix the problem in this way.

Thanks Dan

2011/2/7 Daniel Wittenberg <daniel.wittenberg.r0ko at statefarm.com>

> Add this to your script in the first 10 lines to keep epn from parsing:
>
>
>
> # nagios: -epn
>
>
>
> Dan
>
>
>
> *From:* Juan-Francisco Diez [mailto:mochu33 at gmail.com]
> *Sent:* Monday, February 07, 2011 4:29 AM
> *To:* nagios-users at lists.sourceforge.net
> *Subject:* [Nagios-users] ePN Trouble
>
>
>
> Hi all,
>
> 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:
>
> nagios: **ePN failed to compile /usr/lib/nagios/eventhandlers/
> notify-service-by-email.pl: "String found where operator expected at (eval
> 8) line 52, near "case "PROBLEM""" at /usr/bin/p1.pl line 159.
>
> In the script I use the Switch.pm to assign a different text depending on
> the notification type. The switch is like this:
>
> switch ($optnotiftype) {
>         case "PROBLEM"                            { $NOTIFTYPE='Problem' }
>         case "RECOVERY"                          { $NOTIFTYPE='Recovery' }
>         case "ACKNOWLEDGEMENT"          { $NOTIFTYPE='Notification
> Acknowkedge' }
>         case "DOWNTIMESTART"                { $NOTIFTYPE='Start of Planned
> Stop' }
>         case "DOWNTIMEEND"                    { $NOTIFTYPE='End of Planned
> Stop' }
>         case "DOWNTIMECANCELLED"        { $NOTIFTYPE='Planned Stop
> Canceled' }
>         else                                                  {
> $NOTIFTYPE=$optnotiftype }
> }
>
> All the vars are defined and the script run OK with perl.
>
> Can someone help me to fix this problem?
>
>
> ------------------------------------------------------------------------------
> The modern datacenter depends on network connectivity to access resources
> and provide services. The best practices for maximizing a physical server's
> connectivity to a physical network are well understood - see how these
> rules translate into the virtual world?
> http://p.sf.net/sfu/oracle-sfdevnlfb
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20110207/b8830302/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at 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


More information about the Users mailing list