I have a custom nagios plugin which is written in Perl. For complicated political reasons I am required to hide the source code of this plugin. The only way I found to do this was by using perlc (http://marginalhacks.com/Hacks/perlc).
In the words of author: "Takes a single perl script, converts the block using a simple encoding with an optionally defined key. The script is decoded at runtime and fed to the perl library, to avoid it getting in the hands of the user."
The problem I am getting is that Nagios shows "No output returned from plugin" when I used the compiled version of the plugin. The raw perl source works just fine, as does running the compiled version on the command line.
After debugging for a while I narrowed the problem down to using exit in perl. I.e This works fine when compiled.
This however does not work and results in ""No output returned from plugin"print "OK: Everything is working fine.\n";
It doesn't matter how I exit (0 1 2 or 3) I still get the same problem. I've tried POSIX::_exit(0) instead but no difference?print "OK: Everything is working fine.\n"; exit 1;
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |