MSSQL plugin: Invalid columns at SQL 2014 #7021
Labels
area/sqlserver
bug
unexpected problem or unintended behavior
help wanted
Request for community participation, code, contribution
Milestone
Columns 'total_cpu_usage_ms' and 'total_scheduler_delay_ms' in sys.dm_os_schedulers are only available from SQL Server 2016 on:
https://docs.microsoft.com/de-de/sql/relational-databases/system-dynamic-management-views/sys-dm-os-schedulers-transact-sql?view=sql-server-ver15
Therefore plugin generates an error on SQL 2014 and earlier. Maybe a check for version could be done and based on that query the columns or not.
Relevant telegraf.conf:
System info:
telegraf-1.13.3_windows_amd64.zip
SQL Server: 2014 12.0.4100.1
SQL Server collation: Latin1_General_BIN2
InfluxDB: 1.7.5
Expected behavior:
No error "Invalid column name"
Actual behavior:
2020-02-12T14:01:16Z I! Loaded inputs: sqlserver
2020-02-12T14:01:16Z I! Loaded aggregators:
2020-02-12T14:01:16Z I! Loaded processors:
2020-02-12T14:01:16Z I! Loaded outputs: influxdb
2020-02-12T14:01:16Z I! Tags enabled: host=SV000016 org=casas
2020-02-12T14:01:16Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"SV000016", Flush Interval:10s
2020-02-12T14:01:20Z I! Invalid column name 'total_cpu_usage_ms'.
2020-02-12T14:01:20Z I! Invalid column name 'total_scheduler_delay_ms'.
2020-02-12T14:01:20Z E! [inputs.sqlserver] Error in plugin: mssql: Invalid column name 'total_scheduler_delay_ms'.
The text was updated successfully, but these errors were encountered: