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 <[email protected]>
> Add this to your script in the first 10 lines to keep epn from parsing:
>
>
>
> # nagios: -epn
>
>
>
> Dan
>
>
>
> *From:* Juan-Francisco Diez [mailto:[email protected]]
> *Sent:* Monday, February 07, 2011 4:29 AM
> *To:* [email protected]
> *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
> [email protected]
> 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
>
------------------------------------------------------------------------------
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
[email protected]
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