nrpe and check_mailq

Thomas Guyot-Sionnest dermoth at aei.ca
Sat Aug 23 09:11:40 CEST 2008


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

On 22/08/08 02:02 PM, Mikael Fridh wrote:
> On Fri, Aug 22, 2008 at 7:36 PM, Kevin Freels <kfreels at sendmail.com> wrote:
>> Greetings!
>>
>> I'm having an odd issue with check_mailq and nrpe. When I run the
>> check_mailq command natively (i.e., on the client), I get the proper
>> response:
>>
>> testhost:/usr/local/nagios/libexec # ./check_mailq  -w 300 -c 500
>> OK: mailq (01) is below threshold (300/500) | mailq = 01
> 
> You're root here, right?
> 
>> But if I run it remotely from the server:
>>
>> nagios# ./check_nrpe -H testhost -c check_mailq
>>  | mailq =
> 
> If I remember correctly, you need to be root to run mailq on most
> systems so you might need to give the nrpe user sudo access for it.

Yup, most likely permissions problem.

The easiest way to fix that is by adding it to sudo (nrpe would call
"sudo /usr/local/nagios/libexec/check_mailq  -w 300 -c 500"). Make sure
it does not have the requiretty option or it will still fail from the
daemon.

- --
Thomas
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFIr7gs6dZ+Kt5BchYRAnqjAKDesN+L/DyIb6Cgm0MhmM7bgrTwKwCggyb/
91ppHux9bHnMw6A650JctvA=
=gwTS
-----END PGP SIGNATURE-----

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