check_hpasm error <Virus checked>

Marcus Fleige marcus.fleige at de.rhenus.com
Fri Jan 11 10:39:57 CET 2008


Michel,

PO Michel schrieb am 11.01.2008 10:15 Uhr:
> By imitating the Nagios server and running the "check-nrpe -H miysis -c check_hpasm" command, I get the same output as in Nagios : "UNKNOWN - insufficient rights to call sudo /sbin/hpasmcli".
> 
> What is more surprising is that if I change my Nagios etc/hosts.cfg file to :
> 
> define service {
> host_name miysis
> use template-services
> service_description HP Hardware
> check_command check_hpasm
> }
> 
> instead of
> 
> define service {
> host_name miysis
> use template-services
> service_description HP Hardware
> check_command check_nrpe!check_hpasm
> }
> 
> 
> I also get this "UNKNOWN - insufficient rights to call sudo /sbin/hpasmcli" though I don't use NRPE anymore...

This is the exact correct behaviour, until you added a sudo-command for 
/sbin/hpasmcli on your nagios-server! To get this clear: Whenever you 
start a command via nrpe, the command defined will be executed on your 
_remote_ server. Nagios calls check_nrpe, check_nrpe connects to remote 
site and lets the nrpe daemon execute the defined check (check_hpasm).

When you remove check_nrpe from the check_command definition, check 
_hpasm is executed _locally_!


> Really driving me crazy but it seems to prove the problem is not bound to NRPE but to Nagios itself.
No, its bound to the way you configure your nagios. You have to choose 
what you want to configure: local check or remote check via nrpe. Make 
your choice and concentrate on the solution of just that single problem.

Ok, another try for the nrpe part:

Before checking the real nrpe part, make sure this works:

1. Connect to miysis via ssh.
2. look into /etc/nagios/nrpe.cfg or whereever your nrpe-config is and 
get the username nrpe runs under.
3. su - <found_username>
4. sudo /sbin/hpasmcli -help

If this asks you about a password, your sudo-config lacks an entry.
Else, process as follows:

5. Look at the command definition in your nrpe.cfg.
6. Call check_hpasm exactly as it will be called by nrpe.

Only if all that works, and only if all that works, try to check if it 
also does from your nagios server by calling check_nrpe.

I would suggest you read over the documentation for nagios and nrpe 
again to get the way it works clear.

Oh, and by the way: Gerhard is from southern germany, its impossible for 
them to be impatient by any means! ;-)


Regards,

Marcus Fleige

-------------------------------------------------------------------------
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