[Nagiosplug-help] How do I use check_rbl.pl in Nagios?
Marc Powell
marc at ena.com
Fri Jul 17 16:10:54 CEST 2009
On Jul 16, 2009, at 10:27 PM, H Manohar rayker wrote:
> Hi,
>
> I am a newbie to Nagios.
Welcome. I'd highly recommend you read through much of the
documentation to familiarize yourself with these concepts. We provide
help with the expectation that you have done so.
>
> 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”
127 means that the location of the plugin, as specified in the
command_line, is incorrect.
> 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$
> }
This tells nagios to run the command '/some/path/to(*)/check_rbl.pl!
some.ip.address(*2)
The script named 'check_rbl.pl!some.ip.address' doesn't exist.
* - whatever the path for $USER1$ in resource.cfg is set to
*2 - Whatever the value for 'address' is in the host{} definition.
This is not what you tested above 'perl check_rbl.pl
xxx.yyyyyyyy.zzz'. As you can see.
If xxx.yyyyyyy.zzz is the host{} address, you can use --
define command{
command_name check_rbl
command_line $USER1$/check_rbl.pl $HOSTADDRESS$
}
If it is not the host address, you can pass it as a Command Argument
from the service definition or hard code it in the command_line of the
command{} definition. See the Macros documentation for details.
Both presume that the the /path/to/perl specified in the first line of
the script check_rbl.pl points to your perl program.
> Please help me out ASAP
This is not an ASAP kind of support system, nor does this seem to be
an ASAP kind of problem. If you need that kind of help, you need to
find a contractor to pay for support.
--
Marc
More information about the Help
mailing list