Skip to content

Commit

Permalink
Fix thresholds case column
Browse files Browse the repository at this point in the history
  • Loading branch information
mstoykov committed Oct 27, 2022
1 parent 674ed43 commit 6d91190
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grafana/dashboards/grafana_dashboard_timescaledb.json
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@
"group": [],
"metricColumn": "none",
"rawQuery": true,
"rawSql": "SELECT\n CASE WHEN \"tags\" = '{}' THEN \"metric\" ELSE \"metric\" || '{' || (SELECT key || ':' || value FROM jsonb_each_text(\"tags\")) || '}' END,\n \"threshold\",\n CASE WHEN \"last_failed\" THEN 0 ELSE 1 END AS pass_fail\nFROM\n thresholds\nWHERE\n $__timeFilter(ts)\nORDER BY 3 ASC\nLIMIT 100",
"rawSql": "SELECT\n CASE WHEN \"tags\" IS NULL THEN \"metric\" ELSE \"metric\" || '{' || (SELECT key || ':' || value FROM jsonb_each_text(\"tags\")) || '}' END,\n \"threshold\",\n CASE WHEN \"last_failed\" THEN 0 ELSE 1 END AS pass_fail\nFROM\n thresholds\nWHERE\n $__timeFilter(ts)\nORDER BY 3 ASC\nLIMIT 100",
"refId": "A",
"select": [
[
Expand Down

0 comments on commit 6d91190

Please sign in to comment.