works from command line fails from web
Marc Powell
marc at ena.com
Thu Jan 8 19:38:27 CET 2009
On Jan 8, 2009, at 12:01 PM, Lois Bennett wrote:
> Hi
> I am using Nagios 3.0.3 on a Solaris 8 box. (Solaris 10 will come soon
> to this box.)
>
> I am moving and upgrading my nagios server. It has been going pretty
> well until now. Two of my check modules work fine when invoked from
> the command line but fail when called by nagios. check_dns and
> check_simap.
>
> I tested that they run in sh with no path set as root.
Nagios does not run as root. Test as the nagios user and you'll likely
see different results.
> I set nagios to run as root but that has not solved my problem.
You should never do this.
> here is the command line output:
> # /opt/TWWfsw/nagiosserver30/libexec/check_dns -H
> coffee.bwh.harvard.edu -s turing --timeout=25
> DNS ok - 0 seconds response time, Address(es) is/are 134.174.249.54
>
> # /opt/TWWfsw/nagiosserver30/libexec/check_simap -H turing -p 993
> SIMAP OK - 0.039 second response time on port 993 [* OK [CAPABILITY
> IMAP4REV1 LITERAL+ SASL-IR LOGIN-REFERRALS AUTH=PLAIN AUTH=LOGIN]
> turing IMAP4rev1 2006c.374 at Thu, 8 Jan 2009 12:40:17 -0500
> (EST)]|time=0.038972s;;;0.000000;10.000000
>
>
> the errors in nagios are
> DNS CRITICAL - '/usr/sbin/nslookup' output parsing exited with no
> address
> IMAPS Connection refused
I'd say either you'll see different results when testing as the nagios
user which will probably provide more direction or the commands being
run by nagios are not the same as what you're testing. Please post the
service{} and command{} definitions for these if your testing as the
nagios user is successful.
--
Marc
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
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