Skip to content

Commit

Permalink
Merge pull request #1214 from PedroMiguelFigueiredo/patch-1
Browse files Browse the repository at this point in the history
Update sqlserver.py
  • Loading branch information
remh committed Jan 15, 2015
2 parents f910715 + 641e37d commit 63c2aba
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions checks.d/sqlserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class SQLServer(AgentCheck):
('sqlserver.stats.batch_requests', 'Batch Requests/sec', ''), # BULK_COUNT
('sqlserver.stats.sql_compilations', 'SQL Compilations/sec', ''), # BULK_COUNT
('sqlserver.stats.sql_recompilations', 'SQL Re-Compilations/sec', ''), # BULK_COUNT
('sqlserver.stats.connections', 'User connections', ''), # LARGE_RAWCOUNT
('sqlserver.stats.connections', 'User Connections', ''), # LARGE_RAWCOUNT
('sqlserver.stats.lock_waits', 'Lock Waits/sec', '_Total'), # BULK_COUNT
('sqlserver.access.page_splits', 'Page Splits/sec', ''), # BULK_COUNT
('sqlserver.stats.procs_blocked', 'Processes Blocked', ''), # LARGE_RAWCOUNT
('sqlserver.stats.procs_blocked', 'Processes blocked', ''), # LARGE_RAWCOUNT
('sqlserver.buffer.checkpoint_pages', 'Checkpoint pages/sec', '') #BULK_COUNT
]

Expand Down Expand Up @@ -223,9 +223,9 @@ def get_sql_type(self, instance, counter_name):
# and PERF_AVERAGE_BULK), we need two metrics: the metrics specified and
# a base metrics to get the ratio. There is no unique schema so we generate
# the possible candidates and we look at which ones exist in the db.
candidates = ( counter_name + " Base",
counter_name.replace("(ms)", "Base"),
counter_name.replace("Avg ", "") + " Base"
candidates = ( counter_name + " base",
counter_name.replace("(ms)", "base"),
counter_name.replace("Avg ", "") + " base"
)
try:
cursor.execute(BASE_NAME_QUERY, candidates)
Expand Down

0 comments on commit 63c2aba

Please sign in to comment.