sdk icon indicating copy to clipboard operation
sdk copied to clipboard

add resultFormat field to Target

Open dougsc opened this issue 4 years ago • 2 comments

I’m using the SDK to manage dashboards and alerts as code. I hit an issue trying to create alerts based on InfluxDB raw query targets. When testing the alert in grafana I see this error message:

request handler error: failed to query data: type assertion to string failed

The grafana code here seems to require that the resultFormat JSON field must be present.

I tested the change in the PR locally (by adding ResultFormat: "time_series" to my Target definition) and the alert performs as expected without the error message.

Let me know if you need any more details, Thanks.

dougsc avatar Aug 17 '21 13:08 dougsc

Coverage Status

Coverage remained the same at 47.962% when pulling 24f8c101af7ada6ab2c0893135893b879d7b3026 on dougsc:add-resultFormat-field into 9de4d14888c553cbde643c3c9fd26633a13d5736 on grafana-tools:master.

coveralls avatar Aug 18 '21 15:08 coveralls

is there any news on this? we also need this feature added.

kevitan avatar Oct 29 '21 13:10 kevitan