how to monitoring SQL?

Marc Powell marc at ena.com
Wed Nov 19 17:34:35 CET 2008


On Nov 19, 2008, at 8:18 AM, Marc Powell wrote:

>
> On Nov 19, 2008, at 7:25 AM, Fernando Rocha wrote:
>
>> Hi Esteban,
>>
>> Try to run the command with "sh -x" before the check_mssql.sh and
>> then send the result to us:
>>
>> [root at localhost libexec]# sh -x check_mssql.sh server user pass 2000
>
> And as the nagios user, not root.

*caveat*, I don't use this plugin nor do I know much about the  
internals of SQL2000.

I tested it out and experienced the same error. It appears that the  
query is not qualified enough, at least for the username I was logging  
in with.

Changing

echo -e "select loginame from sysprocesses where spid > $spid order by  
loginame asc\ngo" > $tmpfile

to

echo -e "select loginame from sys.sysprocesses where spid > $spid  
order by loginame asc\ngo" > $tmpfile

resulted in a successful check --

$ ./check_mssql.sh <redacted> <redacted> <redacted> 2000
OK - MS SQL Server 2000 has 1 user(s) connected: 1 <redacted>.

--
Marc

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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