[Pkg-nagios-devel] Bug#730195: Bug#730195: check_raid depends on root PATH

Jan Wagner waja at cyconet.org
Mon Jan 6 14:22:57 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dear Daniel,

Am 06.01.14 14:23, schrieb Daniel Pocock:
> On 06/01/14 14:06, Jan Wagner wrote:
>> Am 22.11.13 15:16, schrieb Daniel Pocock:
>>> I observed this particular problem with the hpacucli - I use
>>> the packaged version which is in /usr/sbin
>> 
>> As check_raid makes extensive use of sudo, you just need to
>> install sudo and add something like the following to
>> /etc/sudoers.d/
>> 
>> # cat /etc/sudoers.d/check_raid nagios  ALL=NOPASSWD:
>> /usr/sbin/hpasmcli

the following is working well, when running
/usr/lib/nagios/plugins/check_raid as user "snmp" and having
/sbin/hpasmcli:

# cat /etc/sudoers.d/check_raid
snmp  ALL=NOPASSWD: /usr/sbin/hpacucli
snmp  ALL=NOPASSWD: /sbin/hpasmcli

> Not quite ... if the hpacucli binary can't be found by "which" in
> $PATH, then it won't even try to run it with or without sudo
> 
> That is why I made this a bug - maybe the "which" command should
> search using the root path too or some other improvement to the
> script
> 
> Could you please re-open the bug until somebody comes up with a
> strategy for that?  If you want to downgrade the severity that is
> up to you, but as long as there is confusion in the way it searches
> for binaries, that appears to be a bug.

This is indeed a (working) strategy, but what about reading the
documentation, source code, ask check_raid upstream? This is just one
plugin in a bigger collection, please keep in mind that we could not
support (in therms of answering questions) every constellation.

> I agree hpasmcli is not free software - but check_raid does
> interact with it and HP servers are fairly common

You are free to use cciss_vol_status, which is supported by
check_raid, you just need to make use of it. Even the smartctl check
works very well. Please keep in mind to set the correct sudo permissions.

HTH, Jan.
- -- 
Never write mail to <waja at spamfalle.info>, you have been warned!
- -----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GIT d-- s+: a C+++ UL++++ P+ L+++ E--- W+++ N+++ o++ K++ w--- O M V-
PS PE Y++
PGP++ t-- 5 X R tv- b+ DI D+ G++ e++ h---- r+++ y++++
- ------END GEEK CODE BLOCK------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAlLKvEEACgkQ9u6Dud+QFyTWQACfdbHo8rK1an2ynptpOBVw5BDN
zeoAn2d53rilLi8dQcTqc9bNWMfytoVz
=svC/
-----END PGP SIGNATURE-----



More information about the Pkg-nagios-devel mailing list