Nagios plugin gives “no output returned” using compiled perl -


I have a custom Nagies plugin that is written in Perl. For complex political reasons, I need to hide the source code of this plugin.

"Takes a single pearl script, converts the block using a simple encoding"

An optionally defined key. The script is decoded on runtime and it is fed to the Pearl library, so that it can be in the hands of the user. "

The problem I have is that Nagois" no output returned from the plugin "when I used the compiled version of the plugin, the raw Pearl source works just fine.

After debugging for a long time, I narrowed the problem down to exit in Perl. Ie

It works fine when compiled.

  print "OK : Everything is working fine. \ N ";  

Although this does not work and does not return any output from the plugin"

  print "ok: everything works fine Is doing. \ N "; Exit 1;  

No matter how I get out (0 1/2 or 3) I still have the same problem. According to

, this issue was resolved by enabling autoflash:

  $ | = 1;  
  • P> $ |

    If set to non-zero, then immediately emphasizes flush and after every write or print on the currently selected output channel, default (0 whether the channel is actually buffer by the system Whether or not; $ | tells you whether you asked Perl to flush after every write). STDOUT will usually be buffed if the line is on the output terminal and otherwise buffered block. Setting this variable is useful primaril Y when you are output to a pipe or socket, as if you are running a pell program under RST and the output is to see that this is happening.

  • > See the article for more information.


    Comments

    Popular posts from this blog

    sqlite3 - UPDATE a table from the SELECT of another one -

    c# - Showing a SelectedItem's Property -

    javascript - Render HTML after each iteration in loop -