Skip to content

Commit

Permalink
feat: add hostname to prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
3n0ugh committed Oct 26, 2024
1 parent 3d67275 commit 5b9d6a9
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,19 @@ This setup ensures continuous data synchronization and minimal downtime in captu
The client collects relevant metrics related to PostgreSQL change data capture (CDC) and makes them available at
the `/metrics` endpoint.

| Metric Name | Description | Labels | Value Type |
|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------|-----------|------------|
| go_pq_cdc_update_total | The total number of `UPDATE` operations captured on specific tables. | slot_name | Counter |
| go_pq_cdc_delete_total | The total number of `DELETE` operations captured on specific tables. | slot_name | Counter |
| go_pq_cdc_insert_total | The total number of `INSERT` operations captured on specific tables. | slot_name | Counter |
| go_pq_cdc_cdc_latency_current | The current latency in capturing data changes from PostgreSQL. | slot_name | Gauge |
| go_pq_cdc_process_latency_current | The current latency in processing the captured data changes. | slot_name | Gauge |
| go_pq_cdc_replication_slot_slot_confirmed_flush_lsn | The last confirmed flush Log Sequence Number (LSN) in the PostgreSQL replication slot. | slot_name | Gauge |
| go_pq_cdc_replication_slot_slot_current_lsn | The current Log Sequence Number (LSN) being processed in the PostgreSQL replication slot. | slot_name | Gauge |
| go_pq_cdc_replication_slot_slot_is_active | Indicates whether the PostgreSQL replication slot is currently active (1 for active, 0 for inactive). | slot_name | Gauge |
| go_pq_cdc_replication_slot_slot_lag | The replication lag measured by the difference between the current LSN and the confirmed flush LSN. | slot_name | Gauge |
| go_pq_cdc_replication_slot_slot_retained_wal_size | The size of Write-Ahead Logging (WAL) files retained for the replication slot in bytes. | slot_name | Gauge |
| runtime metrics | [Prometheus Collector](https://golang.bg/src/runtime/metrics/description.go) | N/A | N/A |
| Metric Name | Description | Labels | Value Type |
|-----------------------------------------------------|-------------------------------------------------------------------------------------------------------|----------------|------------|
| go_pq_cdc_update_total | The total number of `UPDATE` operations captured on specific tables. | slot_name, host| Counter |
| go_pq_cdc_delete_total | The total number of `DELETE` operations captured on specific tables. | slot_name, host| Counter |
| go_pq_cdc_insert_total | The total number of `INSERT` operations captured on specific tables. | slot_name, host| Counter |
| go_pq_cdc_cdc_latency_current | The current latency in capturing data changes from PostgreSQL. | slot_name, host| Gauge |
| go_pq_cdc_process_latency_current | The current latency in processing the captured data changes. | slot_name, host| Gauge |
| go_pq_cdc_replication_slot_slot_confirmed_flush_lsn | The last confirmed flush Log Sequence Number (LSN) in the PostgreSQL replication slot. | slot_name, host| Gauge |
| go_pq_cdc_replication_slot_slot_current_lsn | The current Log Sequence Number (LSN) being processed in the PostgreSQL replication slot. | slot_name, host| Gauge |
| go_pq_cdc_replication_slot_slot_is_active | Indicates whether the PostgreSQL replication slot is currently active (1 for active, 0 for inactive). | slot_name, host| Gauge |
| go_pq_cdc_replication_slot_slot_lag | The replication lag measured by the difference between the current LSN and the confirmed flush LSN. | slot_name, host| Gauge |
| go_pq_cdc_replication_slot_slot_retained_wal_size | The size of Write-Ahead Logging (WAL) files retained for the replication slot in bytes. | slot_name, host| Gauge |
| runtime metrics | [Prometheus Collector](https://golang.bg/src/runtime/metrics/description.go) | N/A | N/A |

### Grafana Dashboard

Expand Down

0 comments on commit 5b9d6a9

Please sign in to comment.