[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
> I have made a sudo entry to allow nagios user to run check_mailq without a
> 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
> nagios-nrpe.x86_64 2.5.2-1.el5.rf
> nagios-plugins.x86_64 1.4.9-1.el5.rf
> nagios-plugins-nrpe.x86_64 2.5.2-1.el5.rf
> nagios-plugins-setuid.x86_64 1.4.9-1.el5.rf
> 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:
- Simply add the following line so that NagIOS can run WITHOUT a real TTY
> 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.
> Nagiosplug-help mailing list
> Nagiosplug-help at ...
> ::: 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