Yey Another "NRPE: Unable to read output"

Andrei-Florian Staicu andrei.staicu at gmail.com
Sun Mar 10 19:24:33 CET 2019


Why do you print to stderr in perl?
https://nagios-plugins.org/doc/guidelines.html#PLUGOUTPUT

On Sun, Mar 10, 2019 at 8:11 PM Pierre Couderc <pierre at couderc.eu> wrote:

> Having this message with a debian plugin, I have tried a minimum example
> : plugin on the "client" in a /home/nagios :
>
>
> nagios at server:/home/nagios$ ls -lh
> total 8.0K
> -rwxrwxrwx 1 nagios nagios 48 Mar  8 07:08 check_bash
> -rwxrwxrwx 1 nagios nagios 73 Mar 10 09:26 check_pl
> nagios at server:/home/nagios$ cat check_bash
> #!/bin/bash
>
>      echo "CRITICAL-pc "
>      exit 2
> nagios at server:/home/nagios$ cat check_pl
> #!/usr/bin/perl
> #
> #
> #
> use strict;
> print STDERR "CRITICAL-pc\n";
> exit(2);
> nagios at server:/home/nagios$ ./check_pl
> CRITICAL-pc
> nagios at server:/home/nagios$ echo $?
> 2
> nagios at server:/home/nagios$ ./check_bash
> CRITICAL-pc
> nagios at server:/home/nagios$ echo $?
> 2
>
> When executed on the nagios "server" :
>
> root at nagios:~# /usr/lib/nagios/plugins/check_nrpe  -H 192.168.163.1 -c
> check_bash
> CRITICAL-pc
> root at nagios:~# /usr/lib/nagios/plugins/check_nrpe  -H 192.168.163.1 -c
> check_pl
> NRPE: Unable to read output
>
> What do I miss ....?
>
> Why perl (or  python...) plugin does not work ?
>
> Thanks for any help
>
> PC
>
>
>
>

-- 
Beware of programmers who carry screwdrivers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20190310/952e2c8f/attachment.html>


More information about the Help mailing list