Check result from check_mssql.pl returns "null" from nagios, but OK from shell ??

Mirza Dedic mirde at oppy.com
Wed Jul 29 23:33:12 CEST 2009


The check_mssql.pl is from the op5 dev team as per the start of the file:

# License: GPL
# Copyright (c) 2005-2008 op5 AB
# Author: op5 dev team <dev at op5.com>
#
# For direct contact with any of the op5 developers send a mail to
# dev at op5.com
# Discussions are directed to the mailing list op5-users at op5.com,
# see http://lists.op5.com/mailman/listinfo/op5-users

My Command/Service definition is:

define command{
        command_name    van-sql01_DB_Test
        command_line    $USER1$/check_mssql -H van-sql01 -U USER  -P PASSWD -o -D Test
}

define service{
        use                             generic-service
        host_name                       van-sql01
        service_description             Database: Test
         check_command                  van-sql01_DB_Test
}

root at van-nagios-new:/usr/local/nagios/libexec# ls -l check_mssql.pl
-rwxrwxrwx 1 nagios nagios 9702 2009-07-27 11:16 check_mssql.pl

Nagios is configured to run under nagios/nagios, I can run the command from shell under the "nagios" user as per below (su - nagios):

nagios at van-nagios-new:/usr/local/nagios/libexec$ ./check_mssql.pl -H van-sql01 -U ***** -P ***** -o -D DWH
OK - Database DWH is online. |online=1

But if I try to get Nagios to do this, all I get is a "null" result.

I can also successfully connect to my SQL server using tsql form the Ubuntu 8.04 box.

Thanks.
-----Original Message-----
From: Marc Powell [mailto:marc at ena.com]
Sent: July/29/2009 2:07 PM
To: Nagios Users Mail-list
Subject: Re: [Nagios-users] Check result from check_mssql.pl returns "null" from nagios, but OK from shell ??

Sorry, also include your test+output, your host{}, service{} and the
command{} definitions.

--
Marc

On Jul 29, 2009, at 4:04 PM, Marc Powell wrote:

>
> On Jul 29, 2009, at 3:48 PM, Mirza Dedic wrote:
>
>> I am trying to use the check plug-in:
>>
>> Check_mssql.pl
>
> Which check_mssql.pl?
>
>> If I run it from the shell, using ./check_mssql.pl using my
>> parameters, everything works OK and the DBs report Online.
>
> As the nagios user?
>
>>
>> When I run this in Nagios, it reports "null" for all of my checks
>> using check_mssql.pl
>
> Usually a permissions, path or environment issue. We'd need to know
> which check_mssql.pl you're using to help figure out which.
>
> --
> Marc
>


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
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