Monitor DHCP Server []
Melkiades
melkiades at gmail.com
Fri Apr 21 11:34:39 CEST 2006
> [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=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Nagios-users mailing list
Nagios-users at 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
More information about the Users
mailing list