No output!

Marc Powell marc at ena.com
Thu Aug 31 21:03:17 CEST 2006



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Ashley Dawkins
> Sent: Thursday, August 31, 2006 8:59 AM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] No output!
> 
> Hi list
> 
> 
> 
> I've spent most of the last week googling for the solution to a
>  problem we're having with Nagios 2.4. All of our checks work fine,
>  apart from our one mysql_query check, which keeps returning "No
>  output!" in Nagios. Even when I change the password to the wrong
>  password, Nagios returns "No output!". When run manually as a
standard
>  user, as nagios or as root however, the check command returns the
>  correct reply (QUERY OK). A workmate also wrote a script to run
>  the check and check it's return value, and this also returned a
>  0.
> 
[snip]

> 
> The command definition is:
> 
> # 'check_mysql_query' command definition
> 
> define command{
> 
>         command_name    check_mysql_query
> 
>         command_line    $USER1$/check_mysql_query -q $ARG1$ -w $ARG2$
>  -d $ARG3$ -H $HOSTALIAS$ -u $ARG4$ -p $ARG5$
> 
>         }
> 
> Here is the check_command taken from the service definition:
> 
> check_mysql_query!"select count(ProductName) from Products where
>  ProductID=1;"!1!database!username!password
> 
> 
> 
> Is there anything we can do to fix this?

You should first verify that nagios is running the command you expect it
is. Change your command definition to be --

define command{
        command_name    check_mysql_query
        command_line    echo '$USER1$/check_mysql_query -q $ARG1$ -w
$ARG2$
 -d $ARG3$ -H $HOSTALIAS$ -u $ARG4$ -p $ARG5$' >>/tmp/nagios.check.log
        }

Examine the contents of /tmp/nagios.check.log after a failed run to
verify it's what you expect. Try running the command exactly as it's
shown in /tmp/nagios.check.log as the nagios user.

--
Marc 

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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