Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New [Unified Alerts] API is broken

See original GitHub issue

Issue Description

For any alert created through the Grafana 8 alerting API, I am getting this error in the Grafana server logs:

t=2021-11-02T10:04:33-0400 lvl=eror msg="QueryData error: unable to parse json {\"dateTimeType\":\"DATETIME\",\"extrapolate\":true,\"format\":\"time_series\",\"formattedQuery\":\"SELECT $timeSeries as t, count() FROM $table WHERE $timeFilter GROUP BY t ORDER BY t\",\"hide\":false,\"intervalFactor\":1,\"intervalMs\":1000,\"maxDataPoints\":43200,\"query\":\"SELECT 1\\n\",\"rawQuery\":true,\"refId\":\"A\",\"round\":\"0s\",\"skip_comments\":true}. Error: json: cannot unmarshal bool into Go struct field Query.rawQuery of type string" logger=plugins.backend pluginId=vertamedia-clickhouse-datasource

My alert query is SELECT 1. I get the same error regardless of which table I choose as the data source. I can trigger this error message by clicking Reformat Query or Run Queries. In the Generated SQL dropdown, all that is displayed is true.

Grafana v8.2.2 and ClickHouse-Grafana v2.3.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6

github_iconTop GitHub Comments

Slachcommented, Nov 18, 2021

@derN3rd thanks a lot for suggestions, Unfortunately, we can’t apply it, cause clickhouse-grafana plugin have different logic than MySQL we simplify first stage interface and on first screen we just set up the table, database and datatime type and datetime field and date field (not required)

And we have many client macros, which we can’t be resolved on client side before pass to backend. Cause, currently, grafana doesn’t provide way to access scopedVariables when use unified alerts and pass data directly to golang backend part to /api/v1/eval instead of try to process it via datasource.ts on browser side

Only one approach will work, try to implement full compatible with sql_query.ts and scanner.ts SQL parser on golang part, but it requires a lot of work and need provide lot of tests.

jmpdtcommented, Nov 18, 2021

@Slach thanks for looking into this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

New [Unified Alerts] API is broken · Issue #380 - GitHub
For any alert created through the Grafana 8 alerting API, I am getting this error in the Grafana ... New [Unified Alerts] API...
Read more >
The new unified alerting system for Grafana: Everything you ...
Alerting is the part of the Grafana open source project that has received the most requests for features and improvements.
Read more >
Migration to unified alerting not working as expected. I end up ...
I'm interested in migrating from the legacy alerting system to unified alerting. According to the docs any version above 8.3 should do this…...
Read more >
Unified communication Api libraries are not installed on ...
Unified communication Api libraries are not found on server <SCOM Management SERVER>. ... *This fixed my channel not working but did not remove...
Read more >
Alerts | Sysdig Documentation
Alert Library: Sysdig Monitor provides a set of alerts by default. Use it as it is or as a template to create your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found