works from command line fails from web

Marc Powell marc at ena.com
Fri Jan 9 00:05:10 CET 2009


On Jan 8, 2009, at 4:04 PM, Lois Bennett wrote:


> when I run as the nagios user from the command line this is what I  
> get:
>
> root #  su - nagios -c  "/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
>
> root #  su - nagios -c
> "/opt/TWWfsw/nagiosserver30/libexec/check_simap -H turing -p 993"
> SIMAP OK - 0.038 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 14:26:56 -0500
> (EST)]|time=0.038170s;;;0.000000;10.000000

Here you are using 'turing' as the host address to connect to.

> In nagios on the web I get these errors.
> 	
> DNS CRITICAL - '/usr/sbin/nslookup' output parsing exited with no  
> address
> IMAPS  Connection refused

These errors imply that there is a problem with the host address.

> The commands are :
> define command{
> 	command_name	check_dns
> 	command_line	$USER1$/check_dns -H coffee.bwh.harvard.edu -s
> $HOSTADDRESS$ --timeout=25
> 	}
> define command{
>        command_name    check_simap
>        command_line    $USER1$/check_simap -H $HOSTADDRESS$ -p 993
>        }

... using $HOSTADDRESS$ in the right place...

> #turing service template
> define service{
> 	host_name			turing
> [snip]
> 	}

In the host{} definition for host_name turing, is the address  
directive ($HOSTADDRESS$) set to 'turing'? If so I suspect that the  
environment (or lack thereof) is preventing the translation of that to  
an IP address. What happens if you use the FQDN or IP address instead?

If it is not set to 'turing', what is it set to and is it correct?

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