[Nagiosplug-help] How do I use check_rbl.pl in Nagios?

H Manohar rayker manohar.r at glowtouch.com
Fri Jul 17 14:41:11 CEST 2009


Hi Ian,

 

Yes I am running this in the command line as root user. But the script and
Nagios execution are under the user Nagios.

 

I tried also with su, it executes fine. 

 

This (check_rbl.pl) is working from the command line, but I don't know how
to define it in the commands.cfg and services.cfg.

Here is the output

 

[nagios at cent-nagios ~]$ su

Password: 

[root at cent-nagios nagios]# perl /usr/local/nagios/libexec/check_rbl.pl
mail.xxyxy.com

All OK: SORBS, Distributed Sender, Spamhaus SBL/XBL/PBL, RFC-Ignorant,
SpamCop, Mail-abuse.org

[root at cent-nagios nagios]#

 

 

Before this script there was another shell script for which I defined as
$USER1$sh abc.sh.. something like this, unfortunately there wasn't any
backup of it, which worked, but now I don't remember it.

 

Please help me out.. :-(

 

Thanks

Manohar

 

  _____  

From: Ian Rarity [mailto:Ian.Rarity at espc.com] 
Sent: Friday, July 17, 2009 1:35 PM
To: 'Nagios Plugin Help List'
Subject: Re: [Nagiosplug-help] How do I use check_rbl.pl in Nagios?

 

The "#" tells me you're running the plugin from the command line as root -
what happens if you su to the Nagios user first, then try running it?

 

Ta,

IR.

 

=-=-=-=-=-=-=-=-=-=

Ian Rarity

Technical Engineer

ESPC (UK) Ltd.

(44)131 624 8000

ian.rarity at espc.com

=-=-=-=-=-=-=-=-=-=

 

From: H Manohar rayker [mailto:manohar.r at glowtouch.com] 
Sent: 17 July 2009 04:28
To: nagiosplug-help at lists.sourceforge.net
Subject: [Nagiosplug-help] How do I use check_rbl.pl in Nagios?

 

Hi,

 

I am a newbie to Nagios.

 

 

Could anyone please let me know how to configure check_rbl.pl in the
commands,services and the hosts file? This when run in command line

 

# perl check_rbl.pl xxx.yyyyyyyyy.zzz would end up giving the correct
results, but when I configured it in the services it displays "Return code
of 127 is out of bounds - plugin may be missing"

 

 

 

Here is my code in the services.cfg file.

 

# check Mail Server DNS for balcklisting

 

define service{

        use                     generic-service

        host_name               XXXX

        service_description     DNS Blacklist check

        check_command           check_rbl

}

 

 

My commands.cfg file definition is here as follows:

 

############################################################################
####

#       Mail Server - DNS Blacklist Check
#

############################################################################
####

 

# 'Check_rbl' command definition.

define command{

        command_name    check_rbl

        command_line    $USER1$/check_rbl.pl!$HOSTADDRESS$

}

 

 

Please help me out ASAP

 

Thanks

Manohar

 

  _____  


Private and Confidential: This e-mail transmission is strictly confidential
and intended solely for the addressee. It may contain privileged and
confidential information and if you are not the intended recipient, you must
not copy, disclose, distribute or take any action in reliance on it. If you
have received this e-mail in error, please delete it and notify our E-mail
Systems Administrator on +44 (0) 131 624 8000. ESPC (UK) Ltd does not accept
any liability for any harm that may be caused to the recipient's system or
data by this message or any attachment.

ESPC (UK) Ltd is a company registered under the Companies Acts in Scotland
(Registered Number SC203585), and having its registered office at 90A George
Street, Edinburgh, Midlothian EH2 3DF.

ESPC (UK) Ltd is an Appointed Representative of Accord Consultancy which is
authorised and regulated by the Financial Services Authority.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20090717/6a94a84b/attachment.html>


More information about the Help mailing list