Getting close here :)
Can't locate utils.pm in @INC (@INC contains: /opt/plugins /etc/perl
/usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl
.) at /usr/local/nagios/libexec/check_mssql line 35.
BEGIN failed--compilation aborted at /usr/local/nagios/libexec/check_mssql line
35
This was in the error log once I ran the check through Nagios with your command.
I looked into the check_mssql script,
And it had:
use File::Temp qw/ :mktemp /;
use vars qw($opt_h $hostname $verbose $PROGNAME $user $password $port $timeout
$online $query $match_string $warning $critical $database
$instance $tdsversion);
use lib "/opt/plugins";
use utils qw($TIMEOUT %ERRORS &print_revision &support);
use Nagios::Plugin::Range;
Once I changed the "use lib" to:
use lib "/ust/local/nagios/libexec";
It worked flawlessly.
Thanks for your help.
Ps. I think the 2>/tmp/log.err is going to come useful to debug these type of
issues. :)
-----Original Message-----
From: Marc Powell [mailto:[email protected]]
Sent: July/29/2009 3:09 PM
To: Nagios Users Mail-list
Subject: Re: [Nagios-users] Check result from check_mssql.pl returns "null"
from nagios, but OK from shell ??
On Jul 29, 2009, at 4:33 PM, Mirza Dedic wrote:
> 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 <[email protected]>
> #
> # For direct contact with any of the op5 developers send a mail to
> # [email protected]
> # Discussions are directed to the mailing list [email protected],
> # 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
> }
Does using a FQDN for -H help here? Also try changing the command
line to capture standard out --
command_line $USER1$/check_mssql -H van-sql01.somedomain.com -U
USER -P PASSWD -o -D Test 2>&1
or
command_line $USER1$/check_mssql -H van-sql01.somedomain.com -U
USER -P PASSWD -o -D Test 2>/tmp/error.log
--
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
[email protected]
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
[email protected]
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