Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_bl
101941
File | Description |
---|---|
nagios-check_bl-1.0.tar.gz | check_bl 1.0 |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
Requirements:
- A working Nagios install
- Perl 5 or above
- Net::DNS module for Perl
- A working Nagios install
- Perl 5 or above
- Net::DNS module for Perl
Reviews (2)
bysteffan, February 17, 2014
Works like a charm.
But there is one bug.
If the hostname can't be resolved into an IP address, you get an error on line 141.
To fix this, i edited the function blkcheck to look like this:
sub blcheck
{
my ($ip, $bl) = @_;
my $lookupip = $ip;
if (!defined($lookupip)) {
print ("ERROR: hostname could not be resolved.\n");
exit $ERRORS{"UNKNOWN"};
}
$lookupip =~
s/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/$4.$3.$2.$1.$bl/;
if (lookup($lookupip)) { return 1 }
else { return 0 }
}
But there is one bug.
If the hostname can't be resolved into an IP address, you get an error on line 141.
To fix this, i edited the function blkcheck to look like this:
sub blcheck
{
my ($ip, $bl) = @_;
my $lookupip = $ip;
if (!defined($lookupip)) {
print ("ERROR: hostname could not be resolved.\n");
exit $ERRORS{"UNKNOWN"};
}
$lookupip =~
s/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/$4.$3.$2.$1.$bl/;
if (lookup($lookupip)) { return 1 }
else { return 0 }
}