how to monitoring SQL?

Fernando Rocha fernando.rocha at opservices.com.br
Thu Nov 20 13:17:12 CET 2008


Hi Esteban,

When you use the parameter -S in the tsql you should specify the SERVER on the /etc/freetds.conf, it is like a tnsnames.ora for Oracle databases.

look at there if you have a entrance that looks like that:

[MYSERVER]
        host = 10.10.10.10
        port = 1433
        tds version = 7.0
        #try domain login = yes
        try server login = yes
        nt domain = MYDOMAIN

otherwise you can change the -S by the -H an -p.

/usr/local/bin/tsql -H 10.10.10.10 -p 1433 -U user -P pass


[]'s
--
Fernando Rocha <fernando.rocha at opservices.com.br>
Analista de Suporte - Operação
OpServices - Porto Alegre - RS - Brasil
+55 51 3275.3588
www.opservices.com.br
www.opmon.org

----- "Esteban Torres Rodriguez" <etorres at dap.es> wrote:

> Anyone can send me the plugin modify correct for mysql?
> 
> + tsqlcmd=/usr/local/bin/tsql
> ++ which cat
> + catcmd=/bin/cat
> ++ which grep
> + grepcmd=/bin/grep
> ++ which rm
> + rmcmd=/bin/rm
> ++ which mktemp
> + mktempcmd=/bin/mktemp
> ++ which wc
> + wccmd=/usr/bin/wc
> ++ which sed
> + sedcmd=/bin/sed
> ++ which tr
> + trcmd=/usr/bin/tr
> ++ which uniq
> + uniqcmd=/usr/bin/uniq
> + hostname=server
> + usr=user
> + pswd=pass
> + srv=2000
> + '[' '!' 4 == 4 ']'
> + '[' /usr/local/bin/tsql == '' ']'
> + exit=3
> ++ /bin/mktemp /tmp/server.XXXXXX
> + tmpfile=/tmp/server.Zy3286
> + '[' 2000 == 7 ']'
> + '[' 2000 == 2000 ']'
> + spid=50
> + echo -e 'select loginame from sys.sysprocesses where spid > 50
> order
> by loginame asc\ngo'
> ++ /bin/mktemp /tmp/server.XXXXXX
> + resultfile=/tmp/server.jn3287
> ++ /bin/mktemp /tmp/server.XXXXXX
> + errorfile=/tmp/server.Xa3288
> + /usr/local/bin/tsql -S server -U user -P pass
> + /bin/grep -q 'Login failed for user' /tmp/server.Xa3288
> + '[' 1 == 0 ']'
> + /bin/grep -q 'There was a problem connecting to the server'
> /tmp/server.Xa3288
> + '[' 0 == 0 ']'
> + /bin/rm -f /tmp/server.Zy3286 /tmp/server.jn3287 /tmp/server.Xa3288
> + echo CRITICAL - Could not make connection to SQL server. Incorrect
> server name or SQL service not running.
> CRITICAL - Could not make connection to SQL server. Incorrect server
> name or SQL service not running.
> + exit 2
> 
> 
> Esteban Torres Rodríguez
> ÁREA DE SOPORTE TÉCNICO Subdirección de Sistemas Informáticos
> Empresa Pública Desarrollo Agrario y Pesquero, 
> email: etorres at dap.es 
> 
> 
> >>> Fernando Rocha <fernando.rocha at opservices.com.br> 19/11/2008
> 14:25
> >>>
> 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
> 
> []'s
> --
> Fernando Rocha <fernando.rocha at opservices.com.br>
> Analista de Suporte - Operação
> OpServices - Porto Alegre - RS - Brasil
> +55 51 3275.3588
> www.opservices.com.br 
> www.opmon.org 
> 
> ----- "Esteban Torres Rodriguez" <etorres at dap.es> wrote:
> 
> > how to monitoring SQL?
> > 
> > I tried monitoring SQL, but not running.
> > 
> > I use check_mssql.sh.
> > 
> > 
> > 
> > ./check_mssql.sh server user pass 2000
> > 
> > CRITICAL - Could not make connection to SQL server. Incorrect
> server
> > name or SQL service not running.
> > 
> > Esteban Torres Rodríguez
> > ÁREA DE SOPORTE TÉCNICO Subdirección de Sistemas Informáticos
> > Empresa Pública Desarrollo Agrario y Pesquero,
> > email: etorres at dap.es 
> > 
> > 
> >
> -------------------------------------------------------------------------
> > 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

-------------------------------------------------------------------------
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