[Nagiosplug-devel] standard in must be a tty
Richard Edward Horner
rich at richhorner.com
Mon Nov 10 22:19:25 CET 2008
Sorry it took me so long to get back to you. I've been super busy.
I can't actually run this because I don't have whatever this service
is but it appears to be exactly what I suspected and that is that you
have a su -c call in the init script. Actually, there are several but
only one in the "status" section.
I agree with Hans, you should rewrite the check status functionality
of the init script into your plugin. It looks like it might need root
privileges in which case I suggest you setup the call (or your script)
to run via sudo with NOPASSWD set on the single command in
/etc/sudoers.
Rich(ard)
On Wed, Nov 5, 2008 at 11:24 AM, Hans Engelen <engelenh at gmail.com> wrote:
> Aside from the error what does the init script do to check the status.
> Most scripts just lookup a pid in a pid file and check to see if said
> pid is still running.
>
> Rather then forking the script it might be easier to redo that check
> in the plugin itself. On that note it might even be easier to just
> check if the process is running rather then fork to a script.
>
> Note that I don't know what a dalimserver is so might not apply.
>
> Cheers,
> Hans
>
> On Tue, Nov 4, 2008 at 5:05 PM, Chase Simms <Csimm at pubpress.com> wrote:
>> I am working on a plugin to monitor a process.
>>
>> http://www.nagiosexchange.org/cgi-bin/page.cgi?g=Detailed%2F2780.html;d=1
>>
>> It works fine when run locally through the shell. But when run through
>> the NRPE sandbox it gets the "standard in must be a tty" error. Where
>> can I find more information on the NRPE sandbox and how to work
>> with/around it?
>>
>> I tried rewriting it as a shell script and it came back with the same
>> result.
>>
>> The broken part is where I try to catch the output of - `/sbin/service
>> dalimServer status`
>>
>> When I run it through NRPE it comes back with nothing.
>>
>> Thank you,
>> Chase
>>
>> The information in this email is intended for the sole use of the
>> addressees and may be confidential and subject to protection under the
>> law. If you are not the intended recipient, you are hereby notified that
>> any distribution or copying of this email is strictly prohibited. If you
>> have received this message in error, please reply and delete your copy.
>>
>>
>> -------------------------------------------------------------------------
>> 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 Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
>> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
>> ::: Please include plugins version (-v) and OS when reporting any issue.
>> ::: Messages without supporting info will risk being sent to /dev/null
>>
>
> -------------------------------------------------------------------------
> 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 Plugin Development Mailing List Nagiosplug-devel at lists.sourceforge.net
> Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
> ::: Please include plugins version (-v) and OS when reporting any issue.
> ::: Messages without supporting info will risk being sent to /dev/null
>
--
Richard Edward Horner
Engineer / Composer / Electric Guitar Virtuoso
rich at richhorner.com
http://richhorner.com
More information about the Devel
mailing list