Skip to content

Commit

Permalink
Add column measurement_db_type to output of all queries if not empty (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorKuchmienko authored Dec 3, 2020
1 parent 498a6da commit a267570
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plugins/inputs/sqlserver/sqlserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,10 @@ func (s *SQLServer) accRow(query Query, acc telegraf.Accumulator, row scanner) e
}
}

if s.DatabaseType != "" {
tags["measurement_db_type"] = s.DatabaseType
}

if query.ResultByRow {
// add measurement to Accumulator
acc.AddFields(measurement,
Expand Down

0 comments on commit a267570

Please sign in to comment.