4.11. Replication Metrics #

Common metrics collected by the replication plugin:

  • postgresql.replication.status_info{status}

Primary node metrics based on the pg_stat_replication view, collected by the replication plugin:

  • postgresql.replication.walsender_all_lag_bytes{client_address}

  • postgresql.replication.walsender_all_lag_milliseconds{client_address}

  • postgresql.replication.walsender_flush_lag_bytes{client_address}

  • postgresql.replication.walsender_flush_lag_milliseconds{client_address}

  • postgresql.replication.walsender_info{client_address, user, application, state}

  • postgresql.replication.walsender_pending_lag_bytes{client_address}

  • postgresql.replication.walsender_replay_lag_bytes{client_address}

  • postgresql.replication.walsender_replay_lag_milliseconds{client_address}

  • postgresql.replication.walsender_write_lag_bytes{client_address}

  • postgresql.replication.walsender_write_lag_milliseconds{client_address}

Standby node metrics based on the pg_stat_wal_receiver view, collected by the replication plugin:

  • postgresql.replication.walreceiver_flush_lag{sender_address}

  • postgresql.replication.walreceiver_info{pid, status, slot_name, conninfo}

  • postgresql.replication.walreceiver_ping_milliseconds{sender_address}

  • postgresql.replication.walreceiver_received_bytes{sender_address}