[Nagiosplug-help] How do i check dhcpd running on remote host

Rajendra Adhikari rajendra at subisu.net.np
Thu Nov 17 03:55:02 CET 2005


Would you please confirm if the check_dhcp that you have patched is the 
one that is from http://oss.op5.se/nagios/op5plugins-2005-09-27.tar.gz.?
And also I would be very grateful if you kindly elaborate on the statement:
check_dhcp must set up an udp socket at port 53 (or 54), which is < 1024 
and thus protected.

Would you please check the following test:

[root at de libexec]# ls -la check_dhcp
-rwsr-xr-x  1 root root 106205 Nov 17 15:54 check_dhcp
[root at de libexec]# check_dhcp -s 192.168.1.2
DHCP problem: No DHCPOFFERs were received.
[root at de libexec]#

The firewall on both dhcp server and nagios monitoring server was 
stopped at the time of this test.

best regards
Rajen.


Andreas Ericsson wrote:

> Rajendra Adhikari wrote:
>
>> The nagios monitor is 3 hops away from the dhcpd server. In between 
>> there are non-cisco routes and they do not support as dhcp relay agent. 
>
>
>
> That doesn't matter, since dhcp-relay work on layer 3 (i.e. it can 
> handle normal, basic IP routing). What I've been trying to tell you is 
> that the check_dhcp I've patched up supports *acting* like a 
> dhcp-relay.  This means it can unicast its packets directly to the 
> destination address so long as you can reach the dhcp-server through 
> normal IP operations. You don't have to have any dhcp-relay hardware 
> for this at all.
>
>
>> Nagios monitor do not get IP address from dhcp server.
>> I have installed the plugin 
>> http://oss.op5.se/nagios/op5plugins-2005-09-27.tar.gz.
>> #check_dhcp --serverip=192.168.1.2
>> Error: Could not bind socket to interface eth0.  Check your 
>> privileges...
>>
>
> chown root:root check_dhcp
> chmod 4755 check_dhcp
>
> check_dhcp must set up an udp socket at port 53 (or 54), which is < 
> 1024 and thus protected.
>
>> It is certain that the dhcp request from nagios monitor will never 
>> reach the dhcp server as there are routers in between and they do not 
>> act as dhcp relay agent.
>
>
> Read above....
>
>> If its not possible in this scenario, then is there any other way to 
>> check if dhcpd is running on the remote host.
>>
>
> It is possible in this scenario.
>
>> regds,
>> Rajen.
>>
>>
>>
>>
>>
>> Andreas Ericsson wrote:
>>
>>> rajendra at subisu.net.np wrote:
>>>
>>>> I have my client (where nagios is installed) on different subnet 
>>>> than that
>>>> of the dhcpd server. However, the dhcpd server is reachable. As it 
>>>> is not
>>>> on the same boradcast domain there is no way the dhcpd server gets the
>>>> broadcast request from the client. I guess, it wont work with the 
>>>> standard
>>>> plugins.
>>>
>>>
>>>
>>>
>>>
>>> No it won't (unless Sean pulled in the dhcp-relay thingie from me). 
>>> That's why I suggested trying the check_dhcp plugin from the package 
>>> at http://oss.op5.se/nagios since it's supposed to be able to do 
>>> this (provided your dhcp-server accepts relayed requests, which I 
>>> think is impossible to turn off).
>>>
>>>
>>>> Is anyone checking the dhcp server running on the separate subnet?
>>>>
>>>
>>> We have a customer that does. The patch originally came from them. I 
>>> only modified it to make it accept arguments for the dhcp-server and 
>>> such.
>>>
>>>>
>>>> regds,
>>>> Rajen.
>>>>
>>>>
>>>>> Rajendra Adhikari wrote:
>>>>>
>>>>>> Can any one suggest how do I check the dhcpd running on the 
>>>>>> remote host?
>>>>>> I have tried it with the check_dhcp standard plugins, but could 
>>>>>> not get
>>>>>> any responce.  Is it possible from standard check_dhcp, or do I 
>>>>>> need to
>>>>>> go for  check by ssh  or some other things. I would be grateful 
>>>>>> if you
>>>>>> kindly suggest me the way to do it or  provide some reference  
>>>>>> about it.
>>>>>>
>>>>>
>>>>> DHCP can only be checked for remote hosts (so far). The DHCP client
>>>>> sends broadcasts to communicate with the server (it has to, since the
>>>>> DHCP server will assign the IP), which means you can't check a DHCP
>>>>> server on a different subnet.
>>>>>
>>>>> I've tried hacking up a patch for that. You can try using the 
>>>>> check_dhcp
>>>>> found in the plugins-package at http://oss.op5.se/nagios
>>>>>
>>>>> Read the --help output (or possibly the source-code). I don't 
>>>>> remember
>>>>> what options you need to specify off-hand.
>>>>>
>>>>> Oh, and let me know if it works. :)
>>>>>
>>>>> -- 
>>>>> Andreas Ericsson                   andreas.ericsson at op5.se
>>>>> OP5 AB                             www.op5.se
>>>>> Tel: +46 8-230225                  Fax: +46 8-230231
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>
>>
>





More information about the Help mailing list