Nagios plug-in for monitoring ISC DHCP

Loren M. Lang lorenl at north-winds.org
Sun Mar 18 06:31:15 UTC 2012


On 3/17/2012 6:11 PM, Joe Vitti wrote:
> This should be possible.
>
> You setup the nagios server as a host with a service for check_dhcp in 
> the nagios config. This will make it monitor itself. You might need 
> the nrpe client setup as well.

I am using NRPE client, but only for checks that need to be run on 
remote servers like check_load.  For network protocols like DNS and 
DHCP, you can just generate the test packets straight from the Nagios 
server and test it like a real client!  Here's the command I have Nagios 
running:

/usr/bin/sudo /usr/lib/nagios/plugins/check_dhcp -s 192.168.1.5 -s 
192.168.1.7 -i eth0

On the Nagios server, it returns this:

WARNING: Received 1 DHCPOFFER(s), only 1 of 2 requested servers 
responded, max lease time = 1800 sec.

But on a third-party server that doesn't run DHCP, I get this:

OK: Received 2 DHCPOFFER(s), 2 of 2 requested servers responded, max 
lease time = 1800 sec.

I'd prefer to have the Nagios server run the test and generate the 
packets directly rather than rely on a third-party to be up and do the 
test for Nagios.

> _______________________________________________________________
> Joe Vitti
> Network and Systems Administrator
> GCInfotech | 2009 Summer Street | Suite 302 | Stamford, CT 06905
> p: 203.463.7209 | e: jvitti at gcinfotech.com <mailto:jvitti at gcinfotech.com>
>
> On Mar 17, 2012, at 9:07 PM, Loren M. Lang wrote:
>
>> I am using a Nagios plug-in called check_dhcp to monitor both my DHCP 
>> servers.  It works by broadcasting a DHCPDISCOVER message and 
>> monitoring any DHCPOFFERs.  It reports back a Warning status if not 
>> all DHCP servers respond and a Critical status if no one responds. 
>>  The problem I am having is that the Nagios server is running on the 
>> same hardware as one of the DHCP servers and it does not seem to 
>> respond to the DHCPDISCOVER.  I can successfully run the plug-in on a 
>> separate computer to get it to respond, but I'd like to test it from 
>> the same server running all the Nagios checks.  Is it possible to 
>> send a DHCPDISCOVER to the daemon running on the same computer 
>> without using a separate network card tied to the network?
>>
>> -- 
>> Loren M. Lang
>> lorenl at north-winds.org <mailto:lorenl at north-winds.org>
>> http://www.north-winds.org/
>>
>>
>> Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
>> Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654 DE5B
>>
>> _______________________________________________
>> dhcp-users mailing list
>> dhcp-users at lists.isc.org
>> https://lists.isc.org/mailman/listinfo/dhcp-users
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


-- 
Loren M. Lang
lorenl at north-winds.org
http://www.north-winds.org/


Public Key: ftp://ftp.north-winds.org/pub/lorenl_pubkey.asc
Fingerprint: 10A0 7AE2 DAF5 4780 888A  3FA4 DCEE BB39 7654 DE5B

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20120317/39b4f86a/attachment.html>


More information about the dhcp-users mailing list