fr-ser / grafana-sqlite-datasource

Grafana Plugin to enable SQLite as a Datasource
Apache License 2.0
124 stars 17 forks source link

Huge log files being generated by datasource #76

Closed bearbin closed 2 years ago

bearbin commented 2 years ago

My system got filled up with log files generated by the sqlite-datasource. Here's a sample log line:

Nov 14 01:29:22 hostname grafana-server[414380]: t=2021-11-14T01:29:22+0000 lvl=warn msg="Could not convert value to float" logger=plugins.backend pluginId=frser-sqlite-datasource value=
Nov 14 01:29:22 hostname grafana-server[414380]: t=2021-11-14T01:29:22+0000 lvl=warn msg="Could not convert value to float" logger=plugins.backend pluginId=frser-sqlite-datasource value=
Nov 14 01:29:22 hostname grafana-server[414380]: t=2021-11-14T01:29:22+0000 lvl=warn msg="Could not convert value to float" logger=plugins.backend pluginId=frser-sqlite-datasource value=
fr-ser commented 2 years ago

Yeah, that is a valid point. The plugin currently logs this message for every row where it cannot do the expected conversion.

I think the better options are to make this message a debug level log. Maybe going even further and logging this only once per query would make sense. That would require slightly more changes 🤔

I'll definitely change it to a debug level log in the next version. After that I'll wait and see if this is still too verbose for other users

fr-ser commented 2 years ago

The new plugin version with the fix is released: https://github.com/fr-ser/grafana-sqlite-datasource/releases/tag/v2.2.0

bearbin commented 2 years ago

Thanks!