[Nagiosplug-help] SOLVED: check_mailq and check_nrpe = cannot read input
Erik M Cummings
ecummings at pathworkssoftware.com
Thu Jan 31 06:33:30 CET 2008
Erik Cummings <ecummings at ...> writes:
>
> I have searched and found nothing to help with this, although I've seen
several others with the
> same/similar issues.
>
> When running check_mailq locally I get good output/success.
>
> When running check_mailq via check_nrpe I am having NO luck - "Unable to
read output"
>
> I have made a sudo entry to allow nagios user to run check_mailq without a
password.
>
> This command from the local host works:
> /usr/bin/sudo /usr/lib64/nagios/plugins/check_mailq -w 10 -c 20
>
> This command via NRPE does NOT
> /usr/lib64/nagios/plugins/check_nrpe -H XXXXX -c check_mailq -a 10 20
>
> NRPE.cfg excerpt:
> command[check_mailq]=/usr/bin/sudo /usr/lib64/nagios/plugins/check_mailq -w
$ARG1$ -c $ARG2$
>
> sudoers entry (via visudo):
> nagios ALL = NOPASSWD: /usr/lib64/nagios/plugins/
> (and yes...once I figure this out I'll restrict that a little more!)
>
> Only "Unable to read output".
>
> All other commands work fine via NRPE.
>
> CentOS 5 (Red Hat EL5), 64bit AMD
>
> nagios.x86_64 2.9-1.el5.rf
installed
> nagios-nrpe.x86_64 2.5.2-1.el5.rf
installed
> nagios-plugins.x86_64 1.4.9-1.el5.rf
installed
> nagios-plugins-nrpe.x86_64 2.5.2-1.el5.rf
installed
> nagios-plugins-setuid.x86_64 1.4.9-1.el5.rf
installed
>
> Any help is greatly appreciated!~!!!!
- Answering my own post, because we solved this problem and a couple folks
have asked me what the solution was.
- Turns out there is an option in CentOS 5 default for sudo that requires
TTY (terminal/login) in order to run commands. It looks like this:
Defaults requiretty
- Simply add the following line so that NagIOS can run WITHOUT a real TTY
session:
Defaults:nagios !requiretty
Good Luck!
> Erik M. Cummings
> Director of Operations
> Pathworks Software Corporation
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Nagiosplug-help mailing list
> Nagiosplug-help at ...
> https://lists.sourceforge.net/lists/listinfo/nagiosplug-help
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
>
More information about the Help
mailing list