Re: Bad result code in a PERL plugin
Posted: Tue Jan 10, 2017 10:00 am
It's the number of interface, doesn't matter which interface I check, the result (OK, CRITICAL or WARNING), always shows orange (UNKNOWN).
Support for Nagios products and services
https://support.nagios.com/forum/
Code: Select all
enable_embedded_perl=1
Code: Select all
enable_embedded_perl=0
So I added "# nagios: -epn" to the plugin and this solved the problem.Plugin-Specific Use of the Perl Interpreter
Beginning with Nagios 3, you can specify which Perl plugins or scripts should or should not be run under the embedded Perl interpreter. This is particularly useful if you have troublesome Perl scripts which do not work well with the Perl interpreter.
To explicitly tell Nagios whether or not to use the embedded Perl interpreter for a particular perl script, add one of the following entries to your Perl script/plugin...
To tell Nagios to use the Perl interpreter for a particular script, add this line to the Perl script:
# nagios: +epn
To tell Nagios to NOT use the embedded Perl interpreter for a particular script, add this line to the Perl script:
# nagios: -epn
Either line must be located within the first 10 lines of a script for Nagios to detect it.