RE: NRPE: getting mad!
"Rice, Clifford E." <[email protected]>
| Newsgroups | gmane.network.netsaint.user |
|---|---|
| Message-ID | <[email protected]> |
Hello Clifford and all, Howdy: I'm at work and have to use this crazy M$ LookOut which isn't doing the arrows right... ------------------------------------------------------------------------------------------------- [Martin] I did some modifications on my NetSaint installation and the NRPE-plugin following your example. It's now weird, as the check_nrpe command works from the command-line, as shown here: netsainthost:/usr/local/netsaint/libexec # ./check_nrpe sunblade1000 -c check_disk1 DISK OK - [13359230 kB (59%) free on /dev/dsk/c1t1d0s0] netsainthost:/usr/local/netsaint/libexec # ./check_nrpe sunblade1000 -c check_disk2 DISK OK - [17115257 kB (49%) free on /dev/dsk/c1t2d0s0] netsainthost:/usr/local/netsaint/libexec # ./check_nrpe sunblade1000 -c check_load load average: 0.73, 0.85, 1.12 ------------------------------------------------------------------------------- [Cliff] Yup, this can be confusing, we have the usual "client", and "server" words. So... to clarigy on my end. The Netsaint/Nagios "server" is where the Netsaint is running and collecting uptime numbers. The Netsaint/Nagios "client" is a box being monitored by Netsaint or Nagios. The check_nrpe script is run on the "server" to get stats about a "client". Was the script run on the Netsaint client or server? ------------------------------------------------------------------------------------------------------------------- [Martin] ...but not from the NetSaint Host... --- 1034183328] SERVICE ALERT: sunblade1000;RemoteUsers;CRITICAL;SOFT;1;Connection refused by host [1034183388] SERVICE ALERT: sunblade1000;RemoteUsers;CRITICAL;SOFT;2;Connection refused by host [1034183448] SERVICE ALERT: sunblade1000;RemoteUsers;CRITICAL;HARD;3;Connection refused by host [1034183448] SERVICE NOTIFICATION: netsaint;fidelsun;RemoteUsers;CRITICAL;notify-by-email;Connection refused by host -------------------------------------------------------------------------------------------------------------------- [Cliff] OK if this is on the netsaint "server", can you do a telnet <netsaint client> 5666? Unix has all sorts of ways to hang oneself. Hosts.allow, hosts.deny, tcp wrappers, etc. Also, telneting direct is a good test as well. --------------------------------------------------------------------------------------------------------------------- [Martin] Please, read on... > > Below is the nrpe.cfg file on the Sun Client box as well. > #################################################### > # Sample NRPE Config File > # Written by: Ethan Galstad ([email protected]) > # > # Last Modified: 03/30/2000 > #################################################### > > > > # PORT NUMBER > # Port number we should wait for connections on. > # This must be a non-priveledged port (i.e. > 1024). > > server_port=5666 > > > > # SERVER ADDRESS > # Address that nrpe has to bind to in case there are > # more as one interface and we do not want nrpe to bind > # (thus listen) on all interfaces. > > server_address=89.20.32.202 > I understand that this IP points to the host where 'nrpe' is running... isn't it? [Cliff] Yes, this is the IP of the netsaint client where nrpe is actually running. [Martin] > > > # ALLOWED HOST ADDRESSES > # This is a comma-delimited list of IP address of hosts that are allowed > # to talk to the NRPE daemon. > # > # Note: The daemon only does rudimentary checking of the client's IP > # address. I would highly recommend adding entries in your > /etc/hosts.allow > # file to allow only the specified host to connect to the port > # you are running this daemon on. > > # > # Houuam is the Netsaint server > # > > allowed_hosts=127.0.0.1,89.20.32.74,89.20.32.200 > Among these addresses you put the NetSaint host? [Cliff] The first IP is for localhost, the other two are my two Nagios servers. We run Nagios in "production mode" here to gather our actual uptime metrics upon which we get a bonus if we have overall upime within bounds. Ie. one can have more than one host gathering the stats, which is how I've done it. [Martin] > command[check_zombie_procs]=/usr/local/netsaint/libexec/check_procs 5 10 Z this check reports 0 zombie procs --- netsainthost:/usr/local/netsaint/libexec # ./check_nrpe sunblade1000 -c check_zombie_procs OK - 0 processes running with STATE = Z --- ...but there are 3 of them on the system... --- # ps -ef | grep defunct cestix 15105 28209 0 0:00 <defunct> cestix 16017 28209 0 0:00 <defunct> cestix 8825 28209 0 0:00 <defunct> cestix 12696 28209 0 0:00 <defunct> --- Any ideas now??? Thanks in advance! [Cliff] Yup. Please use your favorite editor and see which ps and which flags check_zombie_procs is using. Solaris has 2 "ps" commands which return different output. The script may be looking for something else besides "defunct" or just runs "ps". I'd fully path the ps command and see which one works myself. Here , I have /bin/ps and /usr/ucb/ps. Nice... or instead of that "Z", try "<defunct>" in the config file... (Using the corrent ps is the best option, IMHO. ) HTH Cliff ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf