Hi,
I,m trying to monitoring de deadlocks of a SQL Server with my Nagios instalation, to do this, i'm install de "check_mssql_server.py"
When i execute this command
./check_mssql_server.py -H myIP -U myuser -P mypass
the command works fine
OK: Time to connect was 8.00312805176s|time=8.00312805176s;;;;;
But when im execute
./check_mssql_server.py -H myIP -U myuser -P mypass --deadlocks --warning 20 --critical 30
the result is
Traceback (most recent call last):
File "./check_mssql_server.py", line 464, in <module>
main()
File "./check_mssql_server.py", line 430, in main
execute_query(mssql, options, host)
File "./check_mssql_server.py", line 443, in execute_query
mssql_query.do(mssql)
File "./check_mssql_server.py", line 282, in do
self.run_on_connection(connection)
File "./check_mssql_server.py", line 269, in run_on_connection
self.query_result = cur.fetchone()[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
root@Nagios:/usr/local/nagios/libexec#
Please, im try to solve this for many hours without success, any help is welcome,
thanks in advance
Pedro,
Monitoring SQL Deadlocks without success
-
sucustrupador
- Posts: 4
- Joined: Mon Mar 03, 2014 9:37 am
Re: Monitoring SQL Deadlocks without success
We're going to talk to the developer who wrote that plugin and get back to you.
Former Nagios employee
-
sucustrupador
- Posts: 4
- Joined: Mon Mar 03, 2014 9:37 am
Re: Monitoring SQL Deadlocks without success
Thanks TMCDONALD
I'm wait for the response
Thanks in advance
I'm wait for the response
Thanks in advance
Re: Monitoring SQL Deadlocks without success
Should'nt the arguement be --locks-deadlocks and not --deadlocks??!!
Here are my service definition and command definitions if they help
Code: Select all
./check_mssql_server.py -H myIP -U myuser -P mypass --locks-deadlocks --warning 20 --critical 30Here are my service definition and command definitions if they help
Code: Select all
define service{
use service-sql-server ; See Service Templates section below
host_name XXXXXX
service_description SQL DEAD LOCKS
check_command check_sql_deadlocks!"domain\user"!password!locks-deadlocks
}
Code: Select all
# 'check_mssql_health Deadlocks' command definition
define command{
command_name check_sql_deadlocks
command_line $USER1$/check_mssql_health -server $HOSTADDRESS$ -username $ARG1$ -password $ARG2$ -mode $ARG3$
}
Re: Monitoring SQL Deadlocks without success
-H myIP ; Shoudlnt this be -hostname myIP
-U myuser ; Shouldnt this be -username myuser
-P mypass ; Shouldnt this be -password mypass
According to the list of parameters on his website
-U myuser ; Shouldnt this be -username myuser
-P mypass ; Shouldnt this be -password mypass
According to the list of parameters on his website
Code: Select all
Command line parameters
–hostname <hostname> The database server
–username <username> The database user
–password <password> The database passwort
–port <port> The port, where the server listens (Default: 1433)
–server <server> An alternative to hostname+port. <server> will be looked up in the file freetds.conf.
–mode <modus> With the mode-parameter you tell the plugin what you want it to do. See list below for possible values.
–name <objectname> Several checks can be limited to a single object (e.g. a specific database). It is also used for mode=sql. (See the examples)
–name2 <string> If you use –mode=sql, the SQL-statement will be shown in the plugin output and the performance data (which looks ugly). The parameter name2 can be used to provide a used-defined string.
–warning <range> Values outside this range result in a WARNING.
–critical <range> Values outside this range result in a CRITICAL.
–environment <variable>=<wert> It is possible to set environment variables at runtime with htis parameter. It can be used multiple times.
–method <connectmethode> With this parameter you tell the plugin, which connection method it should use. Known values are: dbi for the perl module DBD::Sybase (default) and sqlrelay for the SQLRelay proxy..
–units <%|KB|MB|GB> This parameter adds units to the performance, when using mode=sql
–dbthresholds With this parameter thresholds are read from the database table check_mssql_health_thresholds
Re: Monitoring SQL Deadlocks without success
Ignore me!!!!!
Ive just realised you are not using the Consol Labs check_mssql_health plugin but a different one on the exchange.
Apologies....Admins remove as appropriate.
Ive just realised you are not using the Consol Labs check_mssql_health plugin but a different one on the exchange.
Apologies....Admins remove as appropriate.
Re: Monitoring SQL Deadlocks without success
Nothing to see here. . .
Move along now
Move along now
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.