I try to use your CPAN-module POE::Compoenten::Server::NRPE. I tried the sample from the CPAN-site and tested against nagios-tool check_nrpe.
the text was fine, but I am not able to get the correct return-value. you described this return_result in the modules-description, but I am not aware how to use it.
would be very nice, if you can give me a very short example, how to return a value <> 0.
thanks a lot!
cheers, christoph
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;