Re: [Nagios-users] Re: Monitor DHCP Server []

2006-04-24 Thread Melkiades
 [Jason, Frank]
 The second most obvious is that something else is already listening on that
 port.  I'd check that next.

 [John P. Rouillard]
 Well since most of the obvious causes are taken care of is anything
 already bound to port 68? Check netstat


That was it!

# grep 68 /etc/services
...
bootpc   68/tcp# Bootstrap Protocol Client
bootpc   68/udp# Bootstrap Protocol Client
...

# netstat -a | grep bootpc
udp 0 0 *:bootpc

After closing all bootpc connections (due to dhcp-client on some
interfaces) it all worked fine :-)

Thank you very much for your support


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
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] Re: Monitor DHCP Server []

2006-04-21 Thread Melkiades
 [Rene]
 You're still in the compliation directory. check_dhcp is not set suid.
 If you do make install it will be copied to the plugin directory
 (usually /usr/local/nagios/libexec) and will get suid
 BUT as it seems you're execute check_dhcp as root in the example above
 (according to the '#'). This should work! Perhaps the problem isn't
 check_dhcp, but there's missing something...
 Please try to run check_dhcp directly as root without sudo.

So, as root

# rm /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp
# rm /usr/local/nagios/libexec/check_dhcp

# cd /opt/nagios/nagios-plugins-1.4.2/plugins/

# make check_dhcp
gcc  -g -O2  -L. -o check_dhcp  check_dhcp.o netutils.o utils.o
../lib/libnagiosplug.a ../lib/libcoreutils.a  -lnsl -lresolv
-I/usr/include

# make install
make[1]: Entering directory `/opt/nagios/nagios-plugins-1.4.2/plugins'
mkdir -m 0755 -p -- /usr/local/nagios/libexec
  /usr/bin/install -c check_dhcp /usr/local/nagios/libexec/check_dhcp
...

# ll /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp
-rwxr-xr-x  1 root root 56028 Apr 21 11:26 check_dhcp

# ll /usr/local/nagios/libexec/check_dhcp
-rwxr-xr-x  1 root root 56028 Apr 21 11:26 check_dhcp

# cd /usr/local/nagios/libexec

# ./check_dhcp -s 10.1.2.97 -v
DHCP socket: 3
Error: Could not bind to DHCP socket (port 68)!  Check your privileges...

:-(
Thanks for your help, Rene


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
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] Re: Monitor DHCP Server []

2006-04-21 Thread Frank, Jason

There are several reasons to fail to bind a low numbered port.  The most
obvious is not having root privileges.  If you running as root
(regardless if the program is setuid root), that is not in play.  The
second most obvious is that something else is already listening on that
port.  I'd check that next.

Jason

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Melkiades
Sent: Friday, April 21, 2006 4:35 AM
To: nagios-users@lists.sourceforge.net
Subject: Re: [Nagios-users] Re: Monitor DHCP Server []

 [Rene]
 You're still in the compliation directory. check_dhcp is not set suid.
 If you do make install it will be copied to the plugin directory
 (usually /usr/local/nagios/libexec) and will get suid BUT as it seems
 you're execute check_dhcp as root in the example above (according to
 the '#'). This should work! Perhaps the problem isn't check_dhcp, but
 there's missing something...
 Please try to run check_dhcp directly as root without sudo.

So, as root

# rm /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp
# rm /usr/local/nagios/libexec/check_dhcp

# cd /opt/nagios/nagios-plugins-1.4.2/plugins/

# make check_dhcp
gcc  -g -O2  -L. -o check_dhcp  check_dhcp.o netutils.o utils.o
../lib/libnagiosplug.a ../lib/libcoreutils.a  -lnsl -lresolv
-I/usr/include

# make install
make[1]: Entering directory `/opt/nagios/nagios-plugins-1.4.2/plugins'
mkdir -m 0755 -p -- /usr/local/nagios/libexec
  /usr/bin/install -c check_dhcp /usr/local/nagios/libexec/check_dhcp
...

# ll /opt/nagios/nagios-plugins-1.4.2/plugins/check_dhcp
-rwxr-xr-x  1 root root 56028 Apr 21 11:26 check_dhcp

# ll /usr/local/nagios/libexec/check_dhcp
-rwxr-xr-x  1 root root 56028 Apr 21 11:26 check_dhcp

# cd /usr/local/nagios/libexec

# ./check_dhcp -s 10.1.2.97 -v
DHCP socket: 3
Error: Could not bind to DHCP socket (port 68)!  Check your
privileges...

:-(
Thanks for your help, Rene


---
Using Tomcat but need to do more? Need to support web services,
security?
Get stuff done quickly with pre-integrated technology to make your job
easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
Geronimo
http://sel.as-us.falkag.net/sel?cmd=kkid0709bid3057dat1642
___
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


font size=1 face=arialThis message (including any attachments) may 
contain confidential or otherwise privileged information and is intended only 
for the individual(s) to which it is addressed. If you are not the named 
addressee you should not disseminate, distribute or copy this e-mail. Please 
notify the sender immediately by e-mail if you have received this e-mail by 
mistake and delete this e-mail from your system. E-mail transmission cannot be 
guaranteed to be secured or error-free as information could be intercepted, 
corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The 
sender therefore does not accept liability for any errors or omissions in the 
contents of this message or that arise as a result of e-mail transmission. If 
verification is required please request a hard-copy version from the sender.

SOURCECORP, Incorporated
www.srcp.com
/font


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid0709bid3057dat1642
___
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] Re: Monitor DHCP Server []

2006-04-21 Thread John P. Rouillard

In message [EMAIL PROTECTED],
Rene Fertig writes:
Am Freitag, 21. April 2006 08:31 schrieb Melkiades:
 More info:
 NAGIOS: SuSE Linux 10 OSS (kernel 2.6.13-15.8-smp)  Nagios v2.1
 DHCP: Win2003 + MS DHCP Server

I am running nagios on SuSE 10, too, and without problems like this.

check_dhcp is set suid (by make install, AFAIR):

ll check_dhcp
-rwsr-xr-x  1 root root 56032 Mar 20 15:16 check_dhcp

./check_dhcp -s 192.168.130.200
DHCP ok: Received 1 DHCPOFFER(s), 1 of 1 requested servers responded, max 
lease time = 3600 sec.

I don't know if that matters, but I have compiled nagios an the plugings 
(still 1.4.2) by myself. I'm not using the rpm's comming with SuSE.

Perhaps you have played with /etc/permissions? Check /var/log/messages if 
there is any hint.

Another idea. See if SE (security enhanced) linux is running.

-- rouilj
John Rouillard
===
My employers don't acknowledge my existence much less my opinions.


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
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