Switch.pm and epn
Samuel Mutel
smutel at monitoring-fr.org
Mon Jan 3 09:47:45 CET 2011
If I execute the plugin from the command line with -wc, I have the message check_oracle.pl syntax OK.
How can I know if a mondule is correctly found by ePn ?
Switch.pm is a standard perl module that is located in /usr/lib/perl5/5.8.8 directory.
Regards,
Samuel Mutel.
----- Mail original -----
De: "Max Schubert" <maxs at webwizarddesign.com>
À: "Nagios Developers List" <nagios-devel at lists.sourceforge.net>
Envoyé: Vendredi 31 Décembre 2010 12:34:47
Objet: Re: [Nagios-devel] Switch.pm and epn
On Thu, Dec 30, 2010 at 10:04 AM, Samuel Mutel <smutel at monitoring-fr.org> wrote:
> Hello,
>
> I want to use Embedded Perl Nagios for a nagios plugin that include Switch.pm.
> When I execute the script in command line, no problem.
> If Nagios execute it, i have this error :
>
> Embedded Perl failed to compile /var/opt/nagios/plugins/cegedim/check_oracle.pl, compile error **ePN failed to compile /var/opt/nagios/plugins/cegedim/check_oracle.pl: "String found where operator expected at (eval 1) line 1114, near "case "TABLESPACE""" at /var/opt/nagios/bin/p1.pl line 248.
>
> I can reproduce this error in command line if I comment out "use switch" in the script;
>
> String found where operator expected at /var/opt/nagios/plugins/cegedim/check_oracle.pl line 1113, near "case "TABLESPACE""
> (Do you need to predeclare case?)
> String found where operator expected at /var/opt/nagios/plugins/cegedim/check_oracle.pl line 1116, near "case "TABLESPACE_BYTES""
> (Do you need to predeclare case?)
> syntax error at /var/opt/nagios/plugins/cegedim/check_oracle.pl line 1112, near ") {"
> syntax error at /var/opt/nagios/plugins/cegedim/check_oracle.pl line 1116, near "case "TABLESPACE_BYTES""
> Execution of /var/opt/nagios/plugins/cegedim/check_oracle.pl aborted due to compilation errors.
What happens if you execute the plugin from the command line with -wc?
Also, as Rodrigo suggested, make sure your use lib statements in your
plugin point to the module that declares the constants ePN is
complaining about.
- Max
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel
More information about the Developers
mailing list