You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just create new panel in a dashboard with the same syntax from anohter panel and it doesn't work. for example I copied query from withdraw by peer panel in Top By prefixes dashboard, the query is SELECT $__timeGroup(interval_time, $__interval) as time, sum(withdraws), p.PeerName as metric FROM stats_chg_bypeer l JOIN v_peers p ON (p.peer_hash_id = l.peer_hash_id) WHERE $__timeFilter(interval_time) AND l.peer_hash_id in ($peer_hash) group by peername,time order by time
I create new panel, and paste that query to it. It comes error db query error: pq: syntax error at or near "$". I suspect grafana macros for Postgresql is not working while I create new panel in a dashboard. Any solution?
The text was updated successfully, but these errors were encountered:
theodofi
changed the title
Grafana-PosgreSql Macro didn't work
Grafana-PostgreSql Macro didn't work
Dec 21, 2022
There is a button on the same line as the datasource (where you expanded the Query Options) on the right with the label "Query Inspector". When you click this, it'll open a panel showing the rendered query, with the macros changed to query syntax. What does the rendered query show there?
I just create new panel in a dashboard with the same syntax from anohter panel and it doesn't work. for example I copied query from withdraw by peer panel in Top By prefixes dashboard, the query is
SELECT $__timeGroup(interval_time, $__interval) as time, sum(withdraws), p.PeerName as metric FROM stats_chg_bypeer l JOIN v_peers p ON (p.peer_hash_id = l.peer_hash_id) WHERE $__timeFilter(interval_time) AND l.peer_hash_id in ($peer_hash) group by peername,time order by time
I create new panel, and paste that query to it.
It comes error db query error: pq: syntax error at or near "$"
. I suspect grafana macros for Postgresql is not working while I create new panel in a dashboard. Any solution?The text was updated successfully, but these errors were encountered: