Check_mssql.sh problem running in Nagios but runs fine on command line
Rimbert Rivera
rrivera at comtex.com
Wed Apr 27 01:11:35 CEST 2005
Using 'sudo -u nagios' with check_mssql.sh runs fine.
I'm using check_mssql.sh written by Cal Evans which only requires
freetds (and only 3 parameters) not the one written by Tom De Blende
which requires freetds and sqsh (and 4 parameters). I was having
problems getting sqsh running (a separate issue).
- Rim
Rimbert Rivera
Manager, Information Technology
COMTEX News Network
rrivera at comtex.com
(703) 820-2000
Discover more about COMTEX at: http://www.comtex.com/
This e-mail is intended solely for the person or entity to which it is
addressed and may contain confidential and/or privileged information.
Any review, dissemination, copying, printing or other use of this e-mail
by persons or entities other than the addressee is prohibited. If you
have received this e-mail in error, please contact the sender
immediately and delete the material from any computer.
-----Original Message-----
From: nagios-users-admin at lists.sourceforge.net
[mailto:nagios-users-admin at lists.sourceforge.net] On Behalf Of Marc
Powell
Sent: Tuesday, April 26, 2005 10:44 AM
To: nagios-users at lists.sourceforge.net
Subject: RE: [Nagios-users] Check_mssql.sh problem running in Nagios but
runs fine on command line
> -----Original Message-----
> From: nagios-users-admin at lists.sourceforge.net [mailto:nagios-users-
> admin at lists.sourceforge.net] On Behalf Of Rimbert Rivera
> Sent: Monday, April 25, 2005 3:32 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] Check_mssql.sh problem running in Nagios but
runs
> fine on command line
>
> I'm trying to run check_mssql.sh in Nagios but I get "Error connecting
to
> server running on ##.##.##.##" where ##.##.##.## is the IP address of
the
> MSSQL server which is correct.
>
> When I try to run the plugin from a command prompt, it executes fine:
> Check_mssql.sh servername username userpassword => "Users = 813 Age In
> Minutes Of Oldest User = 55390584 Max CPU User = 7192945 Max IO User =
> 214744 TotalBlocks = 0"
To start, I haven't used this plugin. However, most often discrepancies
such as this are the result of running the command as root and not as
the nagios user. Did you perform your test as the Nagios user?
>
> Here's the relevant entry in checkcommands.cfg:
> # 'check_mssql.sh' command definition
> define command{
> command_name check_mssql.sh
> command_line $USER1$/check_mssql.sh $HOSTADDRESS$ username
> userpassword
> }
The version of check_mssql.sh included in the 1.4 release of the plugins
appears to be different than what you are using. The error message above
isn't in the code at all and it expects 4 arguments on the command line
--
You did not supply enough arguments.
Usage: ./check_mssql.sh <host> <username> <password> <version>
Perhaps there have been some modifications that will help you.
--
Marc
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide Read honest & candid
reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id396&op=ick
_______________________________________________
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
-------------------------------------------------------
SF.Net email is sponsored by: Tell us your software development plans!
Take this survey and enter to win a one-year sub to SourceForge.net
Plus IDC's 2005 look-ahead and a copy of this survey
Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix
_______________________________________________
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