Follow these instructions to add a replication slot lag graph to Grafana using display tags:
- Direct a web browser at the monitor server on port 3000.
- Click the Home quick menu in the top left-hand corner and choose the PostgreSQL Cluster dashboard.
- Choose the Add panel option from the context menu at the top of the screen.
- Click Select measurement and select postgresql.slot_lag.
- Set the new field to restart_lsn_lag.
- In the GROUP BY line, click the + icon and select tag(slot_name).
- Enter $tag_slot_name in the box to the right of ALIAS BY.
- Leave the FORMAT AS line as Time series.
- Click the gear icon on the left to select General.
- Change Title to Replication Slot Lag.
- Save the dashboard and return to the general dashboard view. ...