Skip to content

Commit

Permalink
Fix duplicate keys in perf counters sqlserver query (#3175)
Browse files Browse the repository at this point in the history
  • Loading branch information
m82labs authored and danielnelson committed Sep 14, 2017
1 parent 103d24b commit 1c5ebd4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/sqlserver/sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,7 @@ CREATE TABLE #PCounters
Primary Key(object_name, counter_name, instance_name)
);
INSERT #PCounters
SELECT RTrim(spi.object_name) object_name
SELECT DISTINCT RTrim(spi.object_name) object_name
, RTrim(spi.counter_name) counter_name
, RTrim(spi.instance_name) instance_name
, spi.cntr_value
Expand All @@ -1044,7 +1044,7 @@ CREATE TABLE #CCounters
Primary Key(object_name, counter_name, instance_name)
);
INSERT #CCounters
SELECT RTrim(spi.object_name) object_name
SELECT DISTINCT RTrim(spi.object_name) object_name
, RTrim(spi.counter_name) counter_name
, RTrim(spi.instance_name) instance_name
, spi.cntr_value
Expand Down

0 comments on commit 1c5ebd4

Please sign in to comment.