[Nagios-users] NRPE mystery
Hello, Finally, resolved the mystery. I was running NRPE under root as nagios user and check_nrpe was returing exit value 0 in any case. bash-3.00#/usr/local/sys/nrpe/bin/nrpe -c /usr/local/sys/nrpe/etc/nrpe.cfg bash-3.00#ps -ef|grep nrpe nagios 3184 677 0 23:30:39 ? 0:00 /usr/local/sys/nrpe/bin/nrpe -c /usr/local/sys/nrpe/etc/nrpe.cfg -d What i did , login as nagios and start the NRPE and it fixed all the issues. bash-3.00# su - nagios bash-3.00$/usr/local/sys/nrpe/bin/nrpe -c /usr/local/sys/nrpe/etc/nrpe.cfg bash-3.00#ps -ef|grep nrpe I still can't understand why it doesnt work when I start NRPE under root as nagios user. Could any one explain please explain? Note: On all other my environments, I am running NRPE under root as nagios user Thanks, Farhan _ Take a summer road trip with Windows Live Hotmail. Multiple prizes and the ultimate dream beach house! http://www.ninemsn.com.au/hotmailroadtrip- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/___ 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
[Nagios-users] NRPE mystery
Hi Sascha, You are exactly right, echo $? returns 0 in all cases check_nrpe 1- /usr/local/sys/nrpe/libexec/check_nrpe -H 127.0.0.1 -c check_users USERS CRITICAL - 7 users currently logged in |users=7;2;3;0 bash-3.00#echo $?0 2- /usr/local/sys/nrpe/libexec/check_nrpe -H 127.0.0.1 -c check_remote Connection refused bash-3.00#echo $?0 doesn't matter how many times you execute it returns 0 all the times but interesting when I run simeple plugin commands it returns right values simple plugins bash-3.00#/usr/local/sys/nrpe/libexec/check_users -w 2 -c 3 USERS CRITICAL - 7 users currently logged in |users=7;2;3;0 bash-3.00#echo $?2 bash-3.00#/usr/local/sys/nrpe/libexec/check_tcp -p 1250 Connection refused bash-3.00#echo $?2 All simple plugins are returning right exit values but only check_nrpe is having issue. bash-3.00#cat /etc/passwd|grep nagiosnagios:x:262:262:nagios user:/usr/local/sys/nrpe:/bin/sh chown -R nagios:nagios /usr/local/sys/nrpe bash-3.00#ps -ef|grep nrpe nagios 3184 677 0 23:30:39 ? 0:00 /usr/local/sys/nrpe/bin/nrpe -c /usr/local/sys/nrpe/etc/nrpe.cfg -d Its good that we have at least know where is the problem. Thanks for your help. Any idea how can we fix itThanks, -- Regards, Farhan Ahmed -- Regards, Farhan Ahmed Senior Systems Engineer Soul Australia Level 14, 201 Kent Streen Sydney NSW 2000 Phone(Office): 61 2 8220 6119 Fax(Office): 61 2 9252 6864 Mobile: 61 432 156906 Email: [EMAIL PROTECTED] URL: www.soulaustralia.com.au _ Time for change? Find your ideal job with SEEK. http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fninemsn%2Eseek%2Ecom%2Eau%2F%3Ftracking%3Dsk%3Atl%3Ask%3Anine%3A0%3Ahottag%3Achange&_t=757263783&_r=SEEK_tagline&_m=EXT- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/___ 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] NRPE mystery
Hi Farhan Ahmed, the only thing I can think of is that the exit codes aren't propagated to the nagios server: > [EMAIL PROTECTED] /usr/local/sys/nrpe/libexec/check_users -w 2 > -c 3 USERS CRITICAL - 11 users currently logged in |users=11;2;3;0 > > [EMAIL PROTECTED] /usr/local/sys/nrpe/libexec/check_tcp -p 1250 > Connection refused > What are the exit codes of these checks? Should be 2. > On Nagios Server: > [EMAIL PROTECTED]:~# /usr/local/nagios/libexec/check_nrpe -H asqstage > -c check_users USERS CRITICAL - 10 users currently logged in > |users=10;2;3;0 > > [EMAIL PROTECTED]:~# /usr/local/nagios/libexec/check_nrpe -H asqstage > -c check_remote Connection refused And here? The exit codes should be 2 also. Succes, cu l8r, Edgar. -- |\ /| :: Addr: Valid Eindhoven B.V. / | \/ | : Edgar R. Matzinger : t.a.v. E.R. Matzinger / || :: Paradijslaan 36 \ /| /\| :: 5611 KN Eindhoven \/ / \ : Valid Eindhoven BV : \ /\ / :: \/ |\/ :: |:: Disclaimer: Any comments, opinions made are mine, etc ... - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ 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
[Nagios-users] NRPE mystery
Hello, I am having really NRPE weird issue, never faced this type of problem before, configured NRPE on hundreds Hosts without any problem but this one is killing me Environment: OS: Solaris 10 Zone NRPE Version: 2.12 Nagios-plugins Version: 1.4.13 OpenSSL: 0.9.8i Nagios Server: Ubuntu 8.04(hardy) Nagios Version: 3.0.5 Problem: I compiled , installed and started NRPE successfully on Solaris 10 zone. But somehow Nagios doesn't show the status critical or warning for this host even services are down. Nagios shows status 'OK' all the time though services are critical For example On Solaris 10 zone, nrpe.cfg file has command[check_users]=/usr/local/sys/nrpe/libexec/check_users -w 2 -c 3 command[check_remote]=/usr/local/sys/nrpe/libexec/check_tcp -p 1250 [EMAIL PROTECTED] /usr/local/sys/nrpe/libexec/check_users -w 2 -c 3 USERS CRITICAL - 11 users currently logged in |users=11;2;3;0 [EMAIL PROTECTED] /usr/local/sys/nrpe/libexec/check_tcp -p 1250 Connection refused On Nagios Server: [EMAIL PROTECTED]:~# /usr/local/nagios/libexec/check_nrpe -H asqstage -c check_users USERS CRITICAL - 10 users currently logged in |users=10;2;3;0 [EMAIL PROTECTED]:~# /usr/local/nagios/libexec/check_nrpe -H asqstage -c check_remote Connection refused So, it means NRPE is passing write information to the check_nrpe on nagios, but somehow Nagios is showing them as OK status check users OK 11-20-2008 14:20:41 0d 0h 20m 28s 1/3 USERS CRITICAL - 10 users currently logged in check Remote Trace OK 11-20-2008 14:16:57 0d 0h 19m 12s 1/3 Connection refused Here is my nagios configuration define host{ use generic-host; Name of host template to use host_name asqstage alias asqstage parents sheila address 163.189.222.51 check_command check-host-alive max_check_attempts 10 contact_groups CMESMonitoringGroup notification_interval 1440 notification_period 24x7 notification_optionsd,u,r } define service{ use generic-service ; Name of service template to use host_name asqstage service_description check users check_command check_nrpe!check_users } define service{ use generic-service ; Name of service template to use host_name asqstage service_description check Remote Trace check_command check_nrpe!check_remote } Please anyone who can help me in this. I am really stuck into it and can't figure out why it is happening. Thanks, -- Regards, Farhan Ahmed _ Your dream beach house escape for summer! Sign up for the Hotmail Road Trip today. http://www.ninemsn.com.au/hotmailroadtrip- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/___ 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