Re: [Nagios-users] check_dhcp seems not working

2009-01-16 Thread Christian Iñiguez
Thank you.

But I have neither firewall nor SELinux enabled. In deed for a moment worked, 
but a couple of hours later it didn't work again.

It's really weird.



- Mensaje original 
De: Kevin Keane subscript...@kkeane.com
CC: nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 21:55:07
Asunto: Re: [Nagios-users] check_dhcp seems not working

Thank you!

In my case, the server-side firewall works without a problem. The server 
does hand out DHCP addresses all the time.

It was the client-side firewall (i.e., the one on the Nagios server) 
that blocked the DHCP request, even though I opened both ports 67 and 68 
for both TCP and UDP. It happened both with broadcast DHCP requests and 
with directed ones (using the -s serverip arg).

Oddly enough, I didn't see anything at all in the firewall log that 
would indicate what was blocked.

James Miller wrote:
 Sorry for the top post

    1. Lease Request - The client sends a broadcast requesting an IP
      address
    2. Lease Offer - The server sends the above information and marks
      the offered address as unavailable. The message sent is a
      DHCPOFFER broadcast message.
    3. Lease Acceptance - The first offer received by the client is
      accepted. The acceptance is sent from the client as a broadcast
      (DHCPREQUEST message) including the IP address of the DNS server
      that sent the accepted offer. Other DHCP servers retract their
      offers and mark the offered address as available and the
      accepted address as unavailable.
    4. Server lease acknowledgement - The server sends a DHCPACK or a
      DHCPNACK if an unavailable address was requested.

 All DHCP packets travel as UDP datagrams; all client-sent packets have 
 source port 68 and destination port 67; all server-sent packets have 
 source port 67 and destination port 68. For example, a server-side 
 firewall should allow the following types of packets:

    * Incoming packets from 0.0.0.0 or dhcp-pool to dhcp-ip
    * Incoming packets from any address to 255.255.255.255
    * Outgoing packets from dhcp-ip to dhcp-pool or 255.255.255.255

 where dhcp-ip represents any address configured on a DHCP server host 
 and dhcp-pool stands for the pool from which a DHCP server assigns 
 addresses to clients


 Jim

  


 Kevin Keane wrote:
 Christian, actually, your question prompted me to try it again. Turned 
 out that it was the firewall software on my Nagios box that blocked the 
 DHCP request. As soon as I turned it off, check_dhcp worked. I'm not yet 
 sure which ports to open to make it work with the firewall on. So far, I 
 tried ports 67 and 68 for both TCP and UDP, but that seems not to be enough.

 Christian Iñiguez wrote:
  
 Exactly Kevin, you are right



 - Mensaje original 
 De: Kevin Keane subscript...@kkeane.com
 CC: nagios-users@lists.sourceforge.net
 Enviado: jueves, 15 de enero, 2009 13:39:47
 Asunto: Re: [Nagios-users] check_dhcp seems not working

 jmose...@corp.xanadoo.com wrote:
  
    
 Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

  
    
      
 Hi Everyone

 I have a linux server as dhcp server and it's working very well, and I'd
    
      
        
 like to monitoring it with nrpe plugin and check_dhcp.
  
    
      
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
    
      
        
 DHCPOFFERs were received. But the server is working alright.
  
    
      
 The command line is: check_dhcp -s serverip -t 30

 What am I doing wrong? Any suggest?

 Thanks in advance!
    
      
        
 I have no idea which flavor of DHCP you are running (probably ISC's), but I
 don't think you are going to be able to run check_dhcp from the DHCP server
 itself.  The DHCP server will see an incoming requeset from itself and
 probably block it.  Therefore, using the nrpe method of doing these checks
 is a moot point.

 If your Nagios server is on the same network as the DHCP server, just run
 check_dhcp from the Nagios box.  If you're running Nagios on a different
 network than the DHCP server and there is a firewall in between, you'll
 probably have to do several things:

 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address
    
      
 I actually have the same problem as Christian, and it does NOT work even 
 though Nagios is running on a different box on the same network as the 
 DHCP server. In fact, the Nagios box actually gets its IP address from 
 the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
 on a SuSE 10.3). I've seen the same problem before against a Windows 
 DHCP server, too, never been able to make check_dhcp work.

 check_dhcp -v

Re: [Nagios-users] check_dhcp seems not working

2009-01-16 Thread jmoseley



Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

Thank you.

But I have neither firewall nor SELinux enabled. In deed for a moment
worked, but a couple of hours later it didn't work again.

It's really weird.

Have you checked your DHCP logs?  Do you have enough leases available in
the subnet you would expect the Nagios server to be offered an address
from?  If your DHCP server doesn't hand out DHCP addresses to other
machines on that network (the same your Nagios server is on), for the ISC
DHCP daemon to even work, you still must define a subnet on that local
network in the DHCP config, even if you only have one DHCP address
available.

This isn't really a Nagios problem, but a problem with check_dhcp.  It
sounds like the plugin is setup with the appropriate permissions (owned by
root, setuid root, etc) and that there are no inbound/outbound firewalls or
SELinux issues to deal with.

Honestly, unless there is a configuration problem with DHCP, I can't think
of anything else.

James







--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley




Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

Hi Everyone

I have a linux server as dhcp server and it's working very well, and I'd
like to monitoring it with nrpe plugin and check_dhcp.

The problem here is the outcome of check_dhcp is always: CRITICAL: No
DHCPOFFERs were received. But the server is working alright.

The command line is: check_dhcp -s serverip -t 30

What am I doing wrong? Any suggest?

Thanks in advance!

I have no idea which flavor of DHCP you are running (probably ISC's), but I
don't think you are going to be able to run check_dhcp from the DHCP server
itself.  The DHCP server will see an incoming requeset from itself and
probably block it.  Therefore, using the nrpe method of doing these checks
is a moot point.

If your Nagios server is on the same network as the DHCP server, just run
check_dhcp from the Nagios box.  If you're running Nagios on a different
network than the DHCP server and there is a firewall in between, you'll
probably have to do several things:

1. Open up a hole in the firewall to allow the Nagios server to request a
DHCP address from the DHCP server
2. Have a DHCP relay statement on the router's interface your Nagios server
connects to so it knows to which server to relay the DHCP request to
3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
Nagios server so it can offer a valid IP address

There are probably other methods as well.

James





--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Christian Iñiguez
In deed both servers (the dhcp server and nagios server) are in the same subnet 
and there is no firewall between them. From the nagios server I run 
check_nrpe!check_dhcp

And in the side of dhcp server I run the command: check_dhcp -s ip_dhcp_server 
-t 30

Actually I'm running other services like check_load, check_procs, etc. With no 
problems.

Just check_dhcp is not working

My dhcp server is a RHEL 5 with dhcp-3.0.5-3.el5

I hope this help!



- Mensaje original 
De: jmose...@corp.xanadoo.com jmose...@corp.xanadoo.com
Para: Christian Iñiguez challenger_jos...@yahoo.com.mx
CC: nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 13:06:21
Asunto: Re: [Nagios-users] check_dhcp seems not working





Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

Hi Everyone

I have a linux server as dhcp server and it's working very well, and I'd
like to monitoring it with nrpe plugin and check_dhcp.

The problem here is the outcome of check_dhcp is always: CRITICAL: No
DHCPOFFERs were received. But the server is working alright.

The command line is: check_dhcp -s serverip -t 30

What am I doing wrong? Any suggest?

Thanks in advance!

I have no idea which flavor of DHCP you are running (probably ISC's), but I
don't think you are going to be able to run check_dhcp from the DHCP server
itself.  The DHCP server will see an incoming requeset from itself and
probably block it.  Therefore, using the nrpe method of doing these checks
is a moot point.

If your Nagios server is on the same network as the DHCP server, just run
check_dhcp from the Nagios box.  If you're running Nagios on a different
network than the DHCP server and there is a firewall in between, you'll
probably have to do several things:

1. Open up a hole in the firewall to allow the Nagios server to request a
DHCP address from the DHCP server
2. Have a DHCP relay statement on the router's interface your Nagios server
connects to so it knows to which server to relay the DHCP request to
3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
Nagios server so it can offer a valid IP address

There are probably other methods as well.

James

__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Morris, Patrick
 I have a linux server as dhcp server and it's working very well, and
 I'd like to monitoring it with nrpe plugin and check_dhcp.
 
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 DHCPOFFERs were received. But the server is working alright.
 
 The command line is: check_dhcp -s serverip -t 30
 
 What am I doing wrong? Any suggest?

This one's come up a billion times or so on the list, but the most likely cause 
of your problem is that the plugin needs to be setuid root.

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Christian Iñiguez
Thanks but actually the plugin is setuid root, and as user root and user nagios 
the outcome is the same =(



- Mensaje original 
De: Morris, Patrick patrick.mor...@hp.com
Para: Christian Iñiguez challenger_jos...@yahoo.com.mx; 
nagios-users@lists.sourceforge.net nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 13:18:08
Asunto: RE: [Nagios-users] check_dhcp seems not working

 I have a linux server as dhcp server and it's working very well, and
 I'd like to monitoring it with nrpe plugin and check_dhcp.
 
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 DHCPOFFERs were received. But the server is working alright.
 
 The command line is: check_dhcp -s serverip -t 30
 
 What am I doing wrong? Any suggest?

This one's come up a billion times or so on the list, but the most likely cause 
of your problem is that the plugin needs to be setuid root.


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley


James Moseley




Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

In deed both servers (the dhcp server and nagios server) are in the same
subnet and there is no firewall between them. From the nagios server I run
check_nrpe!check_dhcp

And in the side of dhcp server I run the command: check_dhcp -s
ip_dhcp_server -t 30

Actually I'm running other services like check_load, check_procs, etc.
With no problems.

Just check_dhcp is not working

My dhcp server is a RHEL 5 with dhcp-3.0.5-3.el5

In my previous reply, I told you that what you are trying to do above will
*not* work.  Do not try and check your DHCP server from the Nagios server
using check_nrpe and running check_dhcp on the DHCP server itself.

Run check_dhcp directly from the Nagios server.

James





--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Kevin Keane
jmose...@corp.xanadoo.com wrote:


 Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

   
 Hi Everyone

 I have a linux server as dhcp server and it's working very well, and I'd
 
 like to monitoring it with nrpe plugin and check_dhcp.
   
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 
 DHCPOFFERs were received. But the server is working alright.
   
 The command line is: check_dhcp -s serverip -t 30

 What am I doing wrong? Any suggest?

 Thanks in advance!
 

 I have no idea which flavor of DHCP you are running (probably ISC's), but I
 don't think you are going to be able to run check_dhcp from the DHCP server
 itself.  The DHCP server will see an incoming requeset from itself and
 probably block it.  Therefore, using the nrpe method of doing these checks
 is a moot point.

 If your Nagios server is on the same network as the DHCP server, just run
 check_dhcp from the Nagios box.  If you're running Nagios on a different
 network than the DHCP server and there is a firewall in between, you'll
 probably have to do several things:

 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address
I actually have the same problem as Christian, and it does NOT work even 
though Nagios is running on a different box on the same network as the 
DHCP server. In fact, the Nagios box actually gets its IP address from 
the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
on a SuSE 10.3). I've seen the same problem before against a Windows 
DHCP server, too, never been able to make check_dhcp work.

check_dhcp -v prints this:

DHCP socket: 3
Hardware address: 00:0c:29:0e:28:4f
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 2138668641 (0x7F797E61)
DHCDISCOVER ciaddr:  0.0.0.0
DHCDISCOVER yiaddr:  0.0.0.0
DHCDISCOVER siaddr:  0.0.0.0
DHCDISCOVER giaddr:  0.0.0.0
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.

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Christian Iñiguez
I'm sorry, I already understood. But well, I did it like you told me, and I got 
the same outcome

Running the check_dhcp on the nagios server.



- Mensaje original 
De: jmose...@corp.xanadoo.com jmose...@corp.xanadoo.com
Para: Christian Iñiguez challenger_jos...@yahoo.com.mx
CC: nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 13:25:24
Asunto: Re: [Nagios-users] check_dhcp seems not working



James Moseley




Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

In deed both servers (the dhcp server and nagios server) are in the same
subnet and there is no firewall between them. From the nagios server I run
check_nrpe!check_dhcp

And in the side of dhcp server I run the command: check_dhcp -s
ip_dhcp_server -t 30

Actually I'm running other services like check_load, check_procs, etc.
With no problems.

Just check_dhcp is not working

My dhcp server is a RHEL 5 with dhcp-3.0.5-3.el5

In my previous reply, I told you that what you are trying to do above will
*not* work.  Do not try and check your DHCP server from the Nagios server
using check_nrpe and running check_dhcp on the DHCP server itself.

Run check_dhcp directly from the Nagios server.

James

__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Christian Iñiguez
Exactly Kevin, you are right



- Mensaje original 
De: Kevin Keane subscript...@kkeane.com
CC: nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 13:39:47
Asunto: Re: [Nagios-users] check_dhcp seems not working

jmose...@corp.xanadoo.com wrote:


 Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

  
 Hi Everyone

 I have a linux server as dhcp server and it's working very well, and I'd
    
 like to monitoring it with nrpe plugin and check_dhcp.
  
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
    
 DHCPOFFERs were received. But the server is working alright.
  
 The command line is: check_dhcp -s serverip -t 30

 What am I doing wrong? Any suggest?

 Thanks in advance!
    

 I have no idea which flavor of DHCP you are running (probably ISC's), but I
 don't think you are going to be able to run check_dhcp from the DHCP server
 itself.  The DHCP server will see an incoming requeset from itself and
 probably block it.  Therefore, using the nrpe method of doing these checks
 is a moot point.

 If your Nagios server is on the same network as the DHCP server, just run
 check_dhcp from the Nagios box.  If you're running Nagios on a different
 network than the DHCP server and there is a firewall in between, you'll
 probably have to do several things:

 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address
I actually have the same problem as Christian, and it does NOT work even 
though Nagios is running on a different box on the same network as the 
DHCP server. In fact, the Nagios box actually gets its IP address from 
the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
on a SuSE 10.3). I've seen the same problem before against a Windows 
DHCP server, too, never been able to make check_dhcp work.

check_dhcp -v prints this:

DHCP socket: 3
Hardware address: 00:0c:29:0e:28:4f
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 2138668641 (0x7F797E61)
DHCDISCOVER ciaddr:  0.0.0.0
DHCDISCOVER yiaddr:  0.0.0.0
DHCDISCOVER siaddr:  0.0.0.0
DHCDISCOVER giaddr:  0.0.0.0
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.

-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


__
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ¡gratis! 
Regístrate ya - http://correo.yahoo.com.mx/ 

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley
   
 Christian Iñiguez 
 challenger_josep 
 h...@yahoo.com.mxTo 
   Morris, Patrick   
 01/15/2009 01:24  patrick.mor...@hp.com,
 PMnagios-users@lists.sourceforge.net  
cc 
   
   Subject 
   Re: [Nagios-users] check_dhcp seems 
   not working 
   
   
   
   
   
   






Christian Iñiguez challenger_jos...@yahoo.com.mx wrote:

Thanks but actually the plugin is setuid root, and as user root and user
nagios the outcome is the same =(

Christian, Patrick is correct, and something I forgot about.  The
check_dhcp plugin needs to be setuid, which you've indicated it is.

Can you try running check_dhcp directly from the Nagios server though?
With your setup, it doesn't make sense to use check_nrpe when you can query
the DHCP server directly.  And as I've said, I'm not sure you are going to
be able to run check_dhcp from the DHCP server itself, unless you have
multiple interfaces.


Morris, Patrick patrick.mor...@hp.com wrote:


This one's come up a billion times or so on the list, but the most likely
cause of your problem is that the plugin needs to be setuid root.



James


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Kevin Keane
Christian, actually, your question prompted me to try it again. Turned 
out that it was the firewall software on my Nagios box that blocked the 
DHCP request. As soon as I turned it off, check_dhcp worked. I'm not yet 
sure which ports to open to make it work with the firewall on. So far, I 
tried ports 67 and 68 for both TCP and UDP, but that seems not to be enough.

Christian Iñiguez wrote:
 Exactly Kevin, you are right



 - Mensaje original 
 De: Kevin Keane subscript...@kkeane.com
 CC: nagios-users@lists.sourceforge.net
 Enviado: jueves, 15 de enero, 2009 13:39:47
 Asunto: Re: [Nagios-users] check_dhcp seems not working

 jmose...@corp.xanadoo.com wrote:
   
 Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

   
 
 Hi Everyone

 I have a linux server as dhcp server and it's working very well, and I'd
 
   
 like to monitoring it with nrpe plugin and check_dhcp.
   
 
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 
   
 DHCPOFFERs were received. But the server is working alright.
   
 
 The command line is: check_dhcp -s serverip -t 30

 What am I doing wrong? Any suggest?

 Thanks in advance!
 
   
 I have no idea which flavor of DHCP you are running (probably ISC's), but I
 don't think you are going to be able to run check_dhcp from the DHCP server
 itself.  The DHCP server will see an incoming requeset from itself and
 probably block it.  Therefore, using the nrpe method of doing these checks
 is a moot point.

 If your Nagios server is on the same network as the DHCP server, just run
 check_dhcp from the Nagios box.  If you're running Nagios on a different
 network than the DHCP server and there is a firewall in between, you'll
 probably have to do several things:

 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address
 
 I actually have the same problem as Christian, and it does NOT work even 
 though Nagios is running on a different box on the same network as the 
 DHCP server. In fact, the Nagios box actually gets its IP address from 
 the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
 on a SuSE 10.3). I've seen the same problem before against a Windows 
 DHCP server, too, never been able to make check_dhcp work.

 check_dhcp -v prints this:

 DHCP socket: 3
 Hardware address: 00:0c:29:0e:28:4f
 DHCPDISCOVER to 255.255.255.255 port 67
 DHCPDISCOVER XID: 2138668641 (0x7F797E61)
 DHCDISCOVER ciaddr:  0.0.0.0
 DHCDISCOVER yiaddr:  0.0.0.0
 DHCDISCOVER siaddr:  0.0.0.0
 DHCDISCOVER giaddr:  0.0.0.0
 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.

   


-- 
Kevin Keane
Owner
The NetTech
Find the Uncommon: Expert Solutions for a Network You Never Have to Think About

Office: 866-642-7116
http://www.4nettech.com

This e-mail and attachments, if any, may contain confidential and/or 
proprietary information. Please be advised that the unauthorized use or 
disclosure of the information is strictly prohibited. The information herein is 
intended only for use by the intended recipient(s) named above. If you have 
received this transmission in error, please notify the sender immediately and 
permanently delete the e-mail and any copies, printouts or attachments thereof.


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread James Miller

Sorry for the top post

  1. Lease Request - The client sends a broadcast requesting an IP address
  2. Lease Offer - The server sends the above information and marks the
 offered address as unavailable. The message sent is a DHCPOFFER
 broadcast message.
  3. Lease Acceptance - The first offer received by the client is
 accepted. The acceptance is sent from the client as a broadcast
 (DHCPREQUEST message) including the IP address of the DNS server
 that sent the accepted offer. Other DHCP servers retract their
 offers and mark the offered address as available and the accepted
 address as unavailable.
  4. Server lease acknowledgement - The server sends a DHCPACK or a
 DHCPNACK if an unavailable address was requested.

All DHCP packets travel as UDP datagrams; all client-sent packets have 
source port 68 and destination port 67; all server-sent packets have 
source port 67 and destination port 68. For example, a server-side 
firewall should allow the following types of packets:


   * Incoming packets from 0.0.0.0 or dhcp-pool to dhcp-ip
   * Incoming packets from any address to 255.255.255.255
   * Outgoing packets from dhcp-ip to dhcp-pool or 255.255.255.255

where dhcp-ip represents any address configured on a DHCP server host 
and dhcp-pool stands for the pool from which a DHCP server assigns 
addresses to clients



Jim





Kevin Keane wrote:
Christian, actually, your question prompted me to try it again. Turned 
out that it was the firewall software on my Nagios box that blocked the 
DHCP request. As soon as I turned it off, check_dhcp worked. I'm not yet 
sure which ports to open to make it work with the firewall on. So far, I 
tried ports 67 and 68 for both TCP and UDP, but that seems not to be enough.


Christian Iñiguez wrote:
  

Exactly Kevin, you are right



- Mensaje original 
De: Kevin Keane subscript...@kkeane.com
CC: nagios-users@lists.sourceforge.net
Enviado: jueves, 15 de enero, 2009 13:39:47
Asunto: Re: [Nagios-users] check_dhcp seems not working

jmose...@corp.xanadoo.com wrote:
  


Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

  

  

Hi Everyone

I have a linux server as dhcp server and it's working very well, and I'd

  


like to monitoring it with nrpe plugin and check_dhcp.
  

  

The problem here is the outcome of check_dhcp is always: CRITICAL: No

  


DHCPOFFERs were received. But the server is working alright.
  

  

The command line is: check_dhcp -s serverip -t 30

What am I doing wrong? Any suggest?

Thanks in advance!

  


I have no idea which flavor of DHCP you are running (probably ISC's), but I
don't think you are going to be able to run check_dhcp from the DHCP server
itself.  The DHCP server will see an incoming requeset from itself and
probably block it.  Therefore, using the nrpe method of doing these checks
is a moot point.

If your Nagios server is on the same network as the DHCP server, just run
check_dhcp from the Nagios box.  If you're running Nagios on a different
network than the DHCP server and there is a firewall in between, you'll
probably have to do several things:

1. Open up a hole in the firewall to allow the Nagios server to request a
DHCP address from the DHCP server
2. Have a DHCP relay statement on the router's interface your Nagios server
connects to so it knows to which server to relay the DHCP request to
3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
Nagios server so it can offer a valid IP address

  
I actually have the same problem as Christian, and it does NOT work even 
though Nagios is running on a different box on the same network as the 
DHCP server. In fact, the Nagios box actually gets its IP address from 
the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
on a SuSE 10.3). I've seen the same problem before against a Windows 
DHCP server, too, never been able to make check_dhcp work.


check_dhcp -v prints this:

DHCP socket: 3
Hardware address: 00:0c:29:0e:28:4f
DHCPDISCOVER to 255.255.255.255 port 67
DHCPDISCOVER XID: 2138668641 (0x7F797E61)
DHCDISCOVER ciaddr:  0.0.0.0
DHCDISCOVER yiaddr:  0.0.0.0
DHCDISCOVER siaddr:  0.0.0.0
DHCDISCOVER giaddr:  0.0.0.0
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 SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
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

Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley




Kevin Keane subscript...@kkeane.com wrote:

Christian, actually, your question prompted me to try it again. Turned
out that it was the firewall software on my Nagios box that blocked the
DHCP request. As soon as I turned it off, check_dhcp worked. I'm not yet
sure which ports to open to make it work with the firewall on. So far, I
tried ports 67 and 68 for both TCP and UDP, but that seems not to be
enough.

Kevin, that's a really good point.  Christian, do you have iptables running
on either the nagios or DHCP server boxes?

James


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Holger Weiss
JFTR:

* jmose...@corp.xanadoo.com [2009-01-15 13:06]:
 If you're running Nagios on a different network than the DHCP server and
 there is a firewall in between, you'll probably have to do several things:
 
 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address

For such a setup, step (2) isn't necessary, as check_dhcp will mimic a
DHCP relay if the --unicast option is specified.

Holger

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Holger Weiss
* Christian Iñiguez challenger_jos...@yahoo.com.mx [2009-01-15 10:46]:
 I have a linux server as dhcp server and it's working very well, and
 I'd like to monitoring it with nrpe plugin and check_dhcp.
 
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 DHCPOFFERs were received. But the server is working alright.

Do you see the request and a reply in the DHCP server's logs?  If so,
could you verify that the server's reply reaches the host running
check_dhcp using tcpdump(8) (e.g., tcpdump -vv port bootps)?

Holger

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley




Holger Weiss hol...@cis.fu-berlin.de  wrote:


* jmose...@corp.xanadoo.com [2009-01-15 13:06]:

 2. Have a DHCP relay statement on the router's interface your Nagios
server
 connects to so it knows to which server to relay the DHCP request to

For such a setup, step (2) isn't necessary, as check_dhcp will mimic a
DHCP relay if the --unicast option is specified.

What I meant was you'd have to have an ip helper-address configured.

James


--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Holger Weiss
* jmose...@corp.xanadoo.com [2009-01-15 14:59]:
 Holger Weiss hol...@cis.fu-berlin.de  wrote:
 * jmose...@corp.xanadoo.com [2009-01-15 13:06]:
  2. Have a DHCP relay statement on the router's interface your Nagios server
  connects to so it knows to which server to relay the DHCP request to

 For such a setup, step (2) isn't necessary, as check_dhcp will mimic a
 DHCP relay if the --unicast option is specified.

 What I meant was you'd have to have an ip helper-address configured.

But that's precisely what you don't need if you use check_dhcp's
--unicast option :-)  If you configure an ip helper-address (as
Cisco calls it), the router will relay local DHCP broadcast packets to
the specified remote DHCP server.  check_dhcp --unicast creates the
same sort of unicast packets such a relay would generate.

Holger

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread jmoseley




Holger Weiss hol...@cis.fu-berlin.de  wrote:

* jmose...@corp.xanadoo.com [2009-01-15 14:59]:
 Holger Weiss hol...@cis.fu-berlin.de  wrote:
 * jmose...@corp.xanadoo.com [2009-01-15 13:06]:
  2. Have a DHCP relay statement on the router's interface your Nagios
server
  connects to so it knows to which server to relay the DHCP request to

 For such a setup, step (2) isn't necessary, as check_dhcp will mimic a
 DHCP relay if the --unicast option is specified.

 What I meant was you'd have to have an ip helper-address configured.

But that's precisely what you don't need if you use check_dhcp's
--unicast option :-)  If you configure an ip helper-address (as
Cisco calls it), the router will relay local DHCP broadcast packets to
the specified remote DHCP server.  check_dhcp --unicast creates the
same sort of unicast packets such a relay would generate.

OK, I've got you now.

Back to the orginal topic.  Christian, another thing to check on the Nagios
server is if you have SELinux enabled.  That could definitely cause
problems with plugins that are SUID root.  If SELinux is enabled, disable
it and try the check_dhcp plugin again.

James



--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
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


Re: [Nagios-users] check_dhcp seems not working

2009-01-15 Thread Kevin Keane
Thank you!

In my case, the server-side firewall works without a problem. The server 
does hand out DHCP addresses all the time.

It was the client-side firewall (i.e., the one on the Nagios server) 
that blocked the DHCP request, even though I opened both ports 67 and 68 
for both TCP and UDP. It happened both with broadcast DHCP requests and 
with directed ones (using the -s serverip arg).

Oddly enough, I didn't see anything at all in the firewall log that 
would indicate what was blocked.

James Miller wrote:
 Sorry for the top post

1. Lease Request - The client sends a broadcast requesting an IP
   address
2. Lease Offer - The server sends the above information and marks
   the offered address as unavailable. The message sent is a
   DHCPOFFER broadcast message.
3. Lease Acceptance - The first offer received by the client is
   accepted. The acceptance is sent from the client as a broadcast
   (DHCPREQUEST message) including the IP address of the DNS server
   that sent the accepted offer. Other DHCP servers retract their
   offers and mark the offered address as available and the
   accepted address as unavailable.
4. Server lease acknowledgement - The server sends a DHCPACK or a
   DHCPNACK if an unavailable address was requested.

 All DHCP packets travel as UDP datagrams; all client-sent packets have 
 source port 68 and destination port 67; all server-sent packets have 
 source port 67 and destination port 68. For example, a server-side 
 firewall should allow the following types of packets:

 * Incoming packets from 0.0.0.0 or dhcp-pool to dhcp-ip
 * Incoming packets from any address to 255.255.255.255
 * Outgoing packets from dhcp-ip to dhcp-pool or 255.255.255.255

 where dhcp-ip represents any address configured on a DHCP server host 
 and dhcp-pool stands for the pool from which a DHCP server assigns 
 addresses to clients


 Jim

  


 Kevin Keane wrote:
 Christian, actually, your question prompted me to try it again. Turned 
 out that it was the firewall software on my Nagios box that blocked the 
 DHCP request. As soon as I turned it off, check_dhcp worked. I'm not yet 
 sure which ports to open to make it work with the firewall on. So far, I 
 tried ports 67 and 68 for both TCP and UDP, but that seems not to be enough.

 Christian Iñiguez wrote:
   
 Exactly Kevin, you are right



 - Mensaje original 
 De: Kevin Keane subscript...@kkeane.com
 CC: nagios-users@lists.sourceforge.net
 Enviado: jueves, 15 de enero, 2009 13:39:47
 Asunto: Re: [Nagios-users] check_dhcp seems not working

 jmose...@corp.xanadoo.com wrote:
   
 
 Christian Iñiguez challenger_jos...@yahoo.com.mx  wrote:

   
 
   
 Hi Everyone

 I have a linux server as dhcp server and it's working very well, and I'd
 
   
 
 like to monitoring it with nrpe plugin and check_dhcp.
   
 
   
 The problem here is the outcome of check_dhcp is always: CRITICAL: No
 
   
 
 DHCPOFFERs were received. But the server is working alright.
   
 
   
 The command line is: check_dhcp -s serverip -t 30

 What am I doing wrong? Any suggest?

 Thanks in advance!
 
   
 
 I have no idea which flavor of DHCP you are running (probably ISC's), but I
 don't think you are going to be able to run check_dhcp from the DHCP server
 itself.  The DHCP server will see an incoming requeset from itself and
 probably block it.  Therefore, using the nrpe method of doing these checks
 is a moot point.

 If your Nagios server is on the same network as the DHCP server, just run
 check_dhcp from the Nagios box.  If you're running Nagios on a different
 network than the DHCP server and there is a firewall in between, you'll
 probably have to do several things:

 1. Open up a hole in the firewall to allow the Nagios server to request a
 DHCP address from the DHCP server
 2. Have a DHCP relay statement on the router's interface your Nagios server
 connects to so it knows to which server to relay the DHCP request to
 3. Setup a small DHCP subnet on the DHCP server in the same IP range as the
 Nagios server so it can offer a valid IP address
 
   
 I actually have the same problem as Christian, and it does NOT work even 
 though Nagios is running on a different box on the same network as the 
 DHCP server. In fact, the Nagios box actually gets its IP address from 
 the same DHCP server that I would like to monitor (ISC DHCP server 3.0.6 
 on a SuSE 10.3). I've seen the same problem before against a Windows 
 DHCP server, too, never been able to make check_dhcp work.

 check_dhcp -v prints this:

 DHCP socket: 3
 Hardware address: 00:0c:29:0e:28:4f
 DHCPDISCOVER to 255.255.255.255 port 67
 DHCPDISCOVER XID: 2138668641 (0x7F797E61)
 DHCDISCOVER ciaddr:  0.0.0.0
 DHCDISCOVER yiaddr:  0.0.0.0
 DHCDISCOVER siaddr:  0.0.0.0
 DHCDISCOVER giaddr:  0.0.0.0
 send_dhcp_packet result: 548




 No (more) data received (nfound: 0