FW: nagios fixes
peter riegersperger
rick at subnet.at
Wed Oct 9 12:14:47 CEST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hi!
we had some problems with two plugins (check_dhcp and check_http)
that our c programming guy fixed for me.
check_dhcp was unable to bind port 68 (not running as root!) and
checl_http had some problems communicating with icecast.
find below a comment on how to fix both. i hope this is of any use
and went to the right people.
greetings,
rick
|-
| peter riegersperger <rick at subnet.at>
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|-
> -----Original Message-----
> check_dhcp needs to bind port 68 which requires root privileges.
> rather than running all tests as root, i added "setuid( 0 );" in
> main before openening the socket and changed the perms "chmod
> u+s".
>
> check_http didn't work correctly with our icecast server. for some
> reason, the last recv after a correct response didn't return 0, but
> -1 and errno set to ECONNRESET. i still don't know, why this
> happens, but the quickest way to work around it, is to replace
>
> if (i < 0)
> {
> terminate (STATE_CRITICAL, "Error in recv()");
> }
>
> with
> if (i < 0 && errno != ECONNRESET )
> {
> terminate (STATE_CRITICAL, "Error in recv()");
> }
>
> in check_http
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.8 for non-commercial use <http://www.pgp.com>
Comment: public key available at http://home.subnet.at/rick/pgp/
iQA/AwUBPaPziCDD9/SWDsvSEQKQXACfS17WYNDTEJIm6wjea9IP4iO61RUAoMyx
JSFnjBw+ZXQjWlcXUYNhK7pr
=XAlp
-----END PGP SIGNATURE-----
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
More information about the Users
mailing list