-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Server input plugin : sqlserver_azurestats measurement field type is not float #6397
Comments
This seems like a good change, if we do this we would need to change the measurement name as well to prevent type conflicts. |
Thank you @danielnelson It is not a problem to change the measurement name. |
That is weird as the data type itself is Decimal - executing this in SQL you can check - and the query itself doesn't do any type conversion to string telegraf/plugins/inputs/sqlserver/sqlserver.go Line 1276 in aef93fd
|
I think I've gotten to the bottom of this, the go-mssqldb library scans these columns to a What this means that in addition to a query we need to create a list of the types that will be returned, ideally for each query but we could also ease into it one query at a time. We'll get this started by converting this one query, but we will need to pick a new measurement name. We could name it |
Changing measurement name would break dashboards and this is used for Managed instance as well - I am personally not for a change in measurement name data as strings is incorrect at best. Wouldn't existing users be fine dropping that measurement? |
Unfortunately, type changes are too messy to transition if you have multiple Telegraf running, as you need to stop all Telegraf and then drop the measurement, then bring them all up again. We have also had issues where measurements are not fully dropped by InfluxDB influxdata/influxdb#9694 and it can result in a database which isn't compatible with both the new and old types. We could continue to emit both measurements so that old dashboards still work, and give time to transition to the new measurement name. Maybe we have the fixed version be a separate query in the configuration file. I suppose another option is renaming the fields but that doesn't think address you concern either, and is kind of ugly. |
Feature Request
Proposal:
I would like the field type of sqlserver_azurestats measurement to be float.
Current behavior:
All field key types are String.
influx query : SHOW FIELD KEYS FROM sqlserver_azurestats
fieldKey fieldType
avg_cpu_percent string
avg_data_io_percent string
avg_log_write_percent string
avg_memory_usage_percent string
max_session_percent string
max_worker_percent string
xtp_storage_percent string
Desired behavior:
Requests to change to float type.
The text was updated successfully, but these errors were encountered: