Hello,
I try to check my DHCP server with Nagios 3.0.3 thanks to the "check_dhcp"
plugins coming from the 1.4.13plugin pack on RedHat Entreprise R5 Server
(2.6.18), (i386 or i686 because I have i686 i686 i386 when i launch uname
-a). I use gcc 4.1.2-44.
My approach is, my Nagios server is located in a network 192.168.A.B and my
DHCP server 192.168.X.Y. And I try to check the correct work of DHCP server
with the following command :
./check_dhcp -v -u -s 192.168.X.Y -r 192.168.A.B -m 01:AB:23:CD:45:EF
Requested server address: 92.168.X.Y
Hardware address: 1:AB:23:CD:45:EF
DHCP socket: 3
Pretending to be relay client 192.168.A.B
DHCPDISCOVER to 192.168.X.Y port 67
DHCPDISCOVER XID: 164920453 (0x9D47C85)
DHCDISCOVER ciaddr: 0.0.0.0
DHCDISCOVER yiaddr: 0.0.0.0
DHCDISCOVER siaddr: 0.0.0.0
DHCDISCOVER giaddr: 192.168.A.B
send_dhcp_packet result: 548
recv_result_1: 331
recv_result_2: 331
receive_dhcp_packet() result: 331
receive_dhcp_packet() source: 192.168.X.Y
Result=OK
DHCPOFFER from IP address 192.168.X.Y via 192.168.X.Y
DHCPOFFER XID: 164920453 (0x9D47C85)
DHCPOFFER chaddr: 01AB23CD45EF
DHCPOFFER ciaddr: 0.0.0.0
DHCPOFFER yiaddr: 192.168.A.B
DHCPOFFER siaddr: 0.0.0.0
DHCPOFFER giaddr: 192.168.A.B
Option: 53 (0x01)
Option: 54 (0x04)
Option: 51 (0x04)
Option: 1 (0x04)
Option: 6 (0x08)
Option: 12 (0x12)
Option: 58 (0x04)
Option: 59 (0x04)
Lease Time: 604800 seconds
Renewal Time: 302400 seconds
Rebinding Time: 529200 seconds
Added offer from server @ 192.168.X.Y of IP address 192.168.A.B
No (more) data received (nfound: 0)
Result=ERROR
Total responses seen on the wire: 1
Valid responses for this machine: 1
DHCP Server Match: Offerer=192.168.X.Y Requested=192.168.X.Y
OK: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, requested
address (192.168.90.B was offered, max lease time = 604800 sec.
I've make a reservation in my infoblox with this MAC address. I try to
analyse the return code but I have nothing,
echo $result ==> NOTHING
How I can verify, if the check works well, and In my web nagios interface
toward the check_dhcp I have : (null).
My declarations in the differents config files :
Commands.cfg :
------------------------
#'check_dhcp' command definition avec réservation adresse MAC
define command{
command_name check_dhcp
command_line sudo $USER1$/check_dhcp -u -s 192.168.X.Y -r
192.168.A.B -m 01:AB:23:CD:45:EF
}
#'check_dhcp2' command definition avec réservation adresse MAC au travers
de variable
define command{
command_name check_dhcp2
command_line sudo $USER1$/check_dhcp -v -u -s $ARG1$ -r $ARG2$
-m $ARG3$
}
#'check_dhcp3' command definition simple
define command{
command_name check_dhcp3
command_line sudo $USER1$/check_dhcp -u -s 192.168.X.Y
}
Switch.cfg :
-----------------
#Define a service to check the DHCP service
define service{
use generic-service
host_name infoblox-forum
service_description dhcp reservation MAC
check_command check_dhcp
}
define service{
use generic-service
host_name infoblox
service_description dhcp2 reservation MAC avec ARG
check_command check_dhcp2
}
define service{
use generic-service
host_name infoblox
service_description dhcp3 sans rien
check_command check_dhcp3
}
How to solve problem with the server Infoblox? And how to test the return
code of the plugins?
Thank you in advance, for your help.
Ptitsnake
Nobody/Anonymous
General plugin execution
None
Public
|
Date: 2009-06-03 13:59 Please post questions regarding your Nagios configuration to the |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2009-06-03 13:59 | hweiss |
| resolution_id | None | 2009-06-03 13:59 | hweiss |
| priority | 9 | 2009-06-03 13:59 | hweiss |
| allow_comments | 1 | 2009-06-03 13:59 | hweiss |
| close_date | - | 2009-06-03 13:59 | hweiss |
| priority | 5 | 2009-06-03 13:43 | ptitsnake |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use