hi!

My question is pretty specific but I am a bit desperate here since some time.

I am using POE and POE::Component::Server::NRPE to implement a Nagios NRPEd.

Its fine but I am not able to return the correct value in the command. but the text is ok.
use POE; use POE::Component::Server::NRPE; # test with: check_nrpe -H localhost -c test; echo $? my $nrped = POE::Component::Server::NRPE->spawn (port => 5666); $nrped->add_command (command => "test", program => sub { print STDOUT "test CRITICAL\n"; return 2; #### always 0??? }); $poe_kernel->run (); return 0;
In the modules site at cpan there is some reference to return_result but I am not aware how to use it.

Maybe someone can give me a quick advise? I would like to return a value not equal to 0.

thanks a lot! cheers, chris

In reply to Return-code in POE::Compoent::Server::NRPE by chris01

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.