Hi All,
I now this is an old post, but i have a problem in monitoring a dhcp
server. Nagios is installed on a machine that is not on the same lan as
the dhcp server. After reading the help, i tried something like this:
cos...@cacti-1:/usr/local/nagios/libexec> *./check_dhcp -v -u -s
10.0.0.2 -i eth1*
Requested server address: 10.0.0.2
DHCP socket: 3
Hardware address: 00:50:56:a1:4f:bf
Pretending to be relay client 192.168.53.250
DHCPDISCOVER to 10.0.0.2 port 67
DHCPDISCOVER XID: 96024288 (0x5B936E0)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 192.168.53.250
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
This CRITICAL answer is given even if i can see the server giving an ip
address from the same class as nagios ip (192.168.53.250). I even see
dhcp binding on the server:
R1#sh ip dhcp binding
Bindings from all pools not associated with VRF:
IP address Client-ID/ Lease expiration Type
Hardware address/
User name
192.168.53.1 0050.56a1.4fbf Jul 08 2010 09:44 AM
Automatic
Now, the problem is that the dhcp server is giving up addreses not in
the same subnet as nagios ip address.
So if i try something like this:
cos...@cacti-1:/usr/local/nagios/libexec> *./check_dhcp -v -u -s
10.0.0.2 -r 1.0.0.8 -i eth1*
Requested server address: 10.0.0.2
DHCP socket: 3
Hardware address: 00:50:56:a1:4f:bf
Pretending to be relay client 192.168.53.250
DHCPDISCOVER to 10.0.0.2 port 67
DHCPDISCOVER XID: 1649874259 (0x62571553)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 192.168.53.250
send_dhcp_packet result: 548
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 0
Valid responses for this machine: 0
CRITICAL: No DHCPOFFERs were received.
where 10.0.0.2 is the ip of dhcp server and 1.0.0.8 an address from a
pool configured on the server, i receive no reply. The server respond like:
*Jul 8 10:04:15.783: DHCPD: there is no address pool for
192.168.53.250 //this is the ip address of nagios.
So from what i see on the server:
DHCPD: DHCPDISCOVER received from client 0050.56a1.4fbf through relay
192.168.53.250
DHCPD: Seeing if there is an internally specified pool class
DHCPD: there is no address pool for 192.168.53.250
I thing that nagios sets the relay agent ip address in dhcp header to be
the ip address of the interface from where the dhcpdiscover is sent. Is
there any posibilities to control this, i mean to put in that header
whatever ip address i want for dhcp relay agent?
Otherwise, i thing nagios cand only monitor dhcp servers on the same
lan/subnet. and i realy need a remote solution for monitoring.
Thx for help.
Cosmin Neagu
NOC Team Leader
Str. I. G. Duca nr 36
Otopeni, Judetul Ilfov, 075100 Romania
Tel: 021 303 3159 / 0732 669 193
www.omnilogic.ro
Marc Powell wrote:
On Jan 14, 2010, at 7:33 AM, Eduardo Barreto wrote:
Hi All,
Does anybody knows or have a clue on how to check a dhcp server, I've tried
direct no success and then I'm trying to monitor it through nrpe.
I'll appreciate any help
There's a check_dhcp plugin in the standard plugins to verify that a DHCP
server his handing out leases. You need to run it from a host on the LAN that
your DHCP server answers on. In most cases you cannot run this plugin on the
DHCP server itself as they are most often configured *not* to give answers to
themselves. If you're limited to running something on the DHCP server itself,
you'll likely only be able to look to see if the DHCP process/service is
running. How that's done depends on the OS of the server and how you can get to
it from the Nagios machine.
--
Marc
------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users@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
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Nagios-users mailing list
Nagios-users@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