Skip to content

Grafana-PostgreSql Macro didn't work #6

@theodofi

Description

@theodofi

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?
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions