Monitoring hosts and DHCP

Matt Lozier mlozier at spindletopoil.com
Tue Nov 20 15:27:36 CET 2007


Hari,

Thank you for this suggestion, but we do have a very small LAN here, and we
simply use the DHCP daemon that is comes with the software on our router.
If I were managing a larger LAN, it's likely that I would use a *nix host to
run a DHCP daemon.

I've configured the router so that it reserves a given IP for a given MAC
that is regularly on the network.  This way, the DHCP daemon can still do
its job of auto-assigning IPs to new machines, but it can also see to it
that the IP doesn't change over time (which solves the problem that I was
experiencing using Nagios).

Thanks to everyone for your help and suggestions!

---
Matt Lozier
IT Analyst
972.644.2581, ext. 248
972.661.2701  fax
 

 
The information contained in this message or any attached document is
confidential and intended only for the individual(s) or entity to which it
is addressed.   The information should be considered privileged and
confidential.  If you are not the intended recipient, you are hereby
notified that any unauthorized use of the information contained in or
transmitted with the communication, or dissemination, distribution, or
copying of this communication is strictly prohibited by law.  If you have
received this communication in error, please inform the sender by
immediately returning this communication to the sender and then deleting the
original message and any copy of it in your possession.

-----Original Message-----
From: Hari Sekhon [mailto:hpsekhon at googlemail.com] 
Sent: Tuesday, November 20, 2007 3:50 AM
To: Matt Lozier
Cc: 'C. Bensend'; nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Monitoring hosts and DHCP

If you dhcp server is on unix, write some code to parse the dhcp leases 
file to give you the mapping as dynamic input to your check. eg.

check_something -H `show_dhcp computer1` ......

or

check_something -H `check_nrpe -H dhcp_server -c show_dhcp -a computer1`

although this would require passing params through NRPE which I am 
absolutely against as a security risk. Alternatively you could define 
lots of nrpe definitions on the dhcp server to get around the need for 
args... show_dhcp_computer1 for example. Depends on how big your 
environment is really.

I actually starting writing something to display dhcp leases but got 
sidetracked and didn't finish. If you could wait a little while, there 
is a good chance that you can just use what I am writing, although I 
started it just to see who was getting dhcp leases on my network to keep 
an easier eye on it.
I will consider your situation and see what can be done about it when 
writing my plugin which I should pick up again and finish shortly...

-h

Hari Sekhon



Matt Lozier wrote:
> Hi Benny,
>
> Thank you for the reply, but unfortunately I'm not using DNS, and I don't
> want to have to :-)
>
> Just want to know if there is a way to monitor hosts that obtain their IP
> address via DHCP.
>
> I'll continue to see what I can do with this, and will reply to the list
if
> I find a solution.
>
> Thanks again,
>  
>
> ---
> Matt Lozier
> Network Administrator
> 972.644.2581, ext. 248
> 972.661.2701  fax
>  
>
>  
> The information contained in this message or any attached document is
> confidential and intended only for the individual(s) or entity to which it
> is addressed.   The information should be considered privileged and
> confidential.  If you are not the intended recipient, you are hereby
> notified that any unauthorized use of the information contained in or
> transmitted with the communication, or dissemination, distribution, or
> copying of this communication is strictly prohibited by law.  If you have
> received this communication in error, please inform the sender by
> immediately returning this communication to the sender and then deleting
the
> original message and any copy of it in your possession.
>
> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net
> [mailto:nagios-users-bounces at lists.sourceforge.net] On Behalf Of C.
Bensend
> Sent: Monday, November 19, 2007 9:45 AM
> To: nagios-users at lists.sourceforge.net
> Subject: Re: [Nagios-users] Monitoring hosts and DHCP
>
>
>   
>> I'm monitoring about 30 machines using Nagios with SNMP checks.  I also
>> have
>> a DHCP server casting each machine on the network their IP address on
>> start-up.  Some machines stay on the majority of the time, others for
only
>> 4-8 hours a day.  The machines generally maintain their same IP address
>> over
>> time as DHCP is designed to try and give a machine back it's same IP, so
>> long as it's available.  However, there have been times when a machine
has
>> changed its IP addresses as a result of using DHCP on this LAN.
>>     
>
> http://nagios.sourceforge.net/docs/2_0/xodtemplate.html#host
>
> Pay particular attention to the address section...  You can use
> the hostname in place of the IP address, at the cost of doing a
> DNS lookup when the host is checked.
>
> Benny
>
>
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list