Nagios – check_rbl – No output returned from plugin

nagiiiooosRecently I faced problems setting up check_rbl v1.3.0 plugin at my nagios 3.4.1. From the gui the state of the check would turn to UNKNOWN and the Status Information would return “No output returned from plugin”

Running the plugin from the cli would answer back normally

# /usr/lib/nagios/plugins/check_rbl -H xx.xx.xx.xx  --extra-opts='rbl@/etc/nagios-plugins/check_rbl.ini' -t 60
CHECK_RBL OK - xx.xx.xx.xx BLACKLISTED on 0 servers of 38 | servers=0;0;0 time=0s;;

The plugin wouldn’t answer back when it was executed from nagios because it was executed using the nagios embedded Perl interpreter.

You can check if you have nagios embedded Perl interpreter compiled and enabled by looking for “use_embedded_perl_implicitly” option at your main nagios configuration file

# cat /etc/nagios3/nagios.cfg  | grep use_embedded_perl_implicitly
use_embedded_perl_implicitly=1

If you have it enabled, you can dissable it for this plugin only by editing the perl script

vi /usr/lib/nagios/plugins/check_rbl

And adding “# nagios: -epn” within the first 10 lines of the script for Nagios to detect it.

#!/usr/bin/perl

# nagios: -epn

package main;

# check_rbl is a Nagios plugin to check if an SMTP server is black- or
# white- listed
#
# See  the INSTALL file for installation instructions

You can read more about the embedded Perl interpreter here

 

  1. Muhammad Qasim

    Hi,
    I have the same problem, Can you please guide me how did you add it in command.cfg
    define command{
    command_name check_rbl
    command_line $USER1$/check_rbl -H $HOSTADDRESS$ –extra-opts=’rbl@/etc/nagios/servers/check_rbl.ini’ -t 60
    }

    Can you please guide how can i use it. It run fine /usr/lib64/nagios/plugins/check_rbl -H ip-address –extra-opts=’rbl@/root/rbl/check_rbl-1.3.2/check_rbl.ini’ -t 60

    Regards
    Qasim

    • Hi

      You’ll have to edit the script

      vi /usr/lib64/nagios/plugins/check_rbl

      And you’ll have to insert “# nagios: -epn”, after “#!/usr/bin/perl”, but within the first 10 lines of the script for Nagios to detect it.

  2. Muhammad Qasim

    Yes i know i have already did that… right now i am using this https://github.com/egeland/nagios-rbl-check/blob/master/check_rbl.py

  3. Muhammad Qasim

    I have my ip checking at 295 places… 🙂

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.