Add column measurement_db_type to output of all queries if not empty (#8464)

This commit is contained in:
Igor Kuchmienko 2020-12-03 19:05:43 +03:00 committed by GitHub
parent 498a6da75f
commit a267570ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

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