check_hpasm error <Virus checked>

Gerhard Lausser Gerhard.Lausser at consol.de
Thu Jan 10 16:03:05 CET 2008


 

> So now the sudo /usr/local/nagios/libexec/check_hpasm -v 
> command runs perfectly launched by the nagios user.
Please do never again run /usr/local/nagios/libexec/check_hpasm -v with
sudo.
The only thing that you need sudo privileges for is the /sbin/hpasmcli
command.

I thought this already worked?
> Running "sudo /sbin/hpasmcli -s help" as nagios provides the exepected
output.

You need to make two things clear.

1. "sudo /sbin/hpasmcli -s help" must not ask you (logged in as the nagios
user. on the host miysis) for a password.

If it asks for a password, edit your /etc/sudoers.
Do not proceed beyond this point until "sudo /sbin/hpasmcli -s help" stops
asking you for a password.

2. "/usr/local/nagios/libexec/check_hpasm" executed by the nagios user
(without sudo. no more sudo) must not ask you for a password. If it does, or
if you see the message "UNKNOWN - insufficient rights to call sudo
sbin/hpasmcli", please goto 1. 
(if you execute check_hpasm as the nagios user, then "sudo
/sbin/hpasmcli..." will be called from inside the plugin)



> I have also removed the "sudo" from the 
> "command[check_hpasm]=" line in my nrpe.conf file and 
> restarted xinetd and nagios.
good.
This means, if the nagios server asks the nrpe daemon to execute the
check_hpasm, it will call "/usr/local/nagios/libexec/check_hpasm" as the
nagios user. if the nrpe daemon was started as the nagios user. then the
daemon will do exactly the same thing you did in step 2.

Now you imitate the nagios server. Login at the nagios server. Call
"check-nrpe -H miysis -c check_hpasm".
 

> problem and I can understand the impatience shown by Gerhard 
I am not really impatient. 

> but Nagios is really not simple to implement even in an 
This problems have absolutely nothing to do with Nagios. Just make sure you
(as the nagios user, not root, without sudo) can execute the commands you
want the nrpe daemon to execute.

Gerhard 


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
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