Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_bl

Rating
3 votes
Favoured:
0
Hits
101571
Files:
FileDescription
nagios-check_bl-1.0.tar.gzcheck_bl 1.0
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
This plugin for Nagios will check whether the specified server is in any of the numerous anti-spam blocklists.
Requirements:
- A working Nagios install
- Perl 5 or above
- Net::DNS module for Perl
Reviews (2)
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 }
}
byBox293, July 23, 2012
I had to edit the check_bl file so it used the plugins folder relevant to Nagios XI. Once I did this is worked beautifully. Great check!