[Nagios-users] nrpe error - nrpe 1.9 - RHEL 5.2

2008-06-12 Thread Tom Brown
Hi

This is an nrpe question so sorry if this is not the right place - I am 
trying to monitor a hp disk array and chassis and i have done this 
before using check_hparray and check_hpasm without issue,

Now however i come accross a situation where nrpe is not starting as the 
user 'nagios'

# /etc/init.d/nrpe restart
Shutting down nrpe:[  OK  ]
Starting nrpe: [  OK  ]

nrpe[16836]: Warning: Could not get group entry for 'nagios'
nrpe[16836]: Warning: Could not get passwd entry for 'nagios'

# ps auxwww | grep nrpe
4294967295 16836 0.0  0.0   740   388 ?Ss   11:32   0:00 
/opt/nagios/bin/nrpe -c /opt/nagios/etc/nrpe.cfg -d

so you can see its not running as the nagios user (Nagios is a NIS map)

BUT

# getent passwd nagios
nagios:NP:666:666:Nagios Monitoring:/home/nagios:/bin/bash

So the box can get the users creds - also

# su - nagios
[EMAIL PROTECTED] ~]$

# cat /opt/nagios/etc/nrpe.cfg | grep nagios
nrpe_user=nagios
nrpe_group=nagios

Any thoughts as to what the issue could be?

thanks



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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 error - nrpe 1.9 - RHEL 5.2

2008-06-12 Thread Tom Brown


 This is an nrpe question so sorry if this is not the right place - I am 
 trying to monitor a hp disk array and chassis and i have done this 
 before using check_hparray and check_hpasm without issue,

 Now however i come accross a situation where nrpe is not starting as the 
 user 'nagios'

 # /etc/init.d/nrpe restart
 Shutting down nrpe:[  OK  ]
 Starting nrpe: [  OK  ]

 nrpe[16836]: Warning: Could not get group entry for 'nagios'
 nrpe[16836]: Warning: Could not get passwd entry for 'nagios'

 # ps auxwww | grep nrpe
 4294967295 16836 0.0  0.0   740   388 ?Ss   11:32   0:00 
 /opt/nagios/bin/nrpe -c /opt/nagios/etc/nrpe.cfg -d

 so you can see its not running as the nagios user (Nagios is a NIS map)

 BUT

 # getent passwd nagios
 nagios:NP:666:666:Nagios Monitoring:/home/nagios:/bin/bash

 So the box can get the users creds - also

 # su - nagios
 [EMAIL PROTECTED] ~]$

 # cat /opt/nagios/etc/nrpe.cfg | grep nagios
 nrpe_user=nagios
 nrpe_group=nagios
   

OK i recompiled nrpe and it now runs as the nagios user - i have a 
different issue though ;)

Even if i run check_nrpe locally on the box i get the following error

# ./check_nrpe -H xx0204 -c check_hpasm
UNKNOWN - insufficient rights to call sudo /sbin/hpasmcli

BUT nrpe is running as the user nagios

$ ps auxwww | grep nrpe
nagios   23963  0.0  0.0  10232   876 ?Ss   15:10   0:00 
/opt/nagios/bin/nrpe -c /opt/nagios/etc/nrpe.cfg -d

and if i run the plugin exactly how its called from nrpe using the 
nagios user it works fine

[EMAIL PROTECTED] ~]$ /opt/nagios/libexec/check_hpasm
OK - Chassis Status OK

so anyone got any thoughts on how to debug this?

thanks



 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
   



-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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 error - nrpe 1.9 - RHEL 5.2

2008-06-12 Thread Daniel López
On Thu June 12 2008 17:57:09 Tom Brown wrote:
 # ./check_nrpe -H xx0204 -c check_hpasm
 UNKNOWN - insufficient rights to call sudo /sbin/hpasmcli

 BUT nrpe is running as the user nagios

 $ ps auxwww | grep nrpe
 nagios   23963  0.0  0.0  10232   876 ?Ss   15:10   0:00
 /opt/nagios/bin/nrpe -c /opt/nagios/etc/nrpe.cfg -d

 and if i run the plugin exactly how its called from nrpe using the
 nagios user it works fine

 [EMAIL PROTECTED] ~]$ /opt/nagios/libexec/check_hpasm
 OK - Chassis Status OK

 so anyone got any thoughts on how to debug this?

Hi, 


I bet it's a sudo issue, maybe related to restrictions executing sudo outside 
a real tty. There was an option in sudoers config related to this. 

eventually try to use capture_plugin.pl ... it works nice.

regards, 

dani

-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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 error - nrpe 1.9 - RHEL 5.2

2008-06-12 Thread Tom Brown



 I bet it's a sudo issue, maybe related to restrictions executing sudo outside 
 a real tty. There was an option in sudoers config related to this. 

 eventually try to use capture_plugin.pl ... it works nice.

   

perhaps something like that as this config works fine on RHEL4 machines 
- Its just on RHEL5 where the issue is, i will look at some options to 
/etc/sudoers


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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 error - nrpe 1.9 - RHEL 5.2

2008-06-12 Thread Tom Brown

 perhaps something like that as this config works fine on RHEL4 machines 
 - Its just on RHEL5 where the issue is, i will look at some options to 
 /etc/sudoers

   

thanks Daniel, it was this line causing the issue

Defaultsrequiretty

it now works!

cheers


-
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
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