check_mssql question

Assaf Flatto nagios at flatto.net
Fri Jul 23 19:02:19 CEST 2010


Joel Brooks wrote:
> hi all,
>
> I've got a question about the check_mssql plugin.  I've got the plugin 
> defined as so:
>
> # command 'check_mssql_db_online'
> define command{
>     command_name                   check_mssql_db_online
>     command_line                   $USER1$/check_mssql -H $HOSTALIAS$ 
> -p $ARG1$ -U "$USER10$" -P "$USER11$" -D "$ARG2$" -o
>     }
>
> USER10 = username
> USER11 = password
>
> This check is checking the status of the tempdb on an mssql server.  
> The check is execute as:
>
> check_mssql -H server1.domain.tld -p 1433 -U username -P password -D 
> tempdb -o
>
> When i run the command by hand on the commandline, it works fine.
>
> When I test the command in the web UI, it works fine.
>
> When the check command runs on schedule, it fails with UNKNOWN state 
> and a message saying the login failed.
>
> how can i debug this to figure out why it fails when running on 
> schedule, but works fine when running by hand...?
>
> thx,
you are using the macro $HOSTALIAS$ , try changing it to $HOSTADDRESS$ 
or $HOSTNAME$

Assaf

-- 
Never,Ever Cut A Deal With a Dragon 




------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
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