Module: Mammoth::PostgresObservabilityMetrics

Included in:
ObservabilityMetrics
Defined in:
lib/mammoth/postgres_observability_metrics.rb

Overview

PostgreSQL slot-specific Prometheus formatting helpers.

Constant Summary collapse

POSTGRES_METRICS =

Metric names and help text for PostgreSQL replication-slot gauges.

{
  "mammoth_postgres_slot_inspection_up" => "1 when PostgreSQL slot inspection succeeds.",
  "mammoth_postgres_slot_present" => "1 when the configured replication slot exists.",
  "mammoth_postgres_slot_ready" => "1 when the configured slot is healthy and active.",
  "mammoth_postgres_slot_active" => "1 when PostgreSQL reports the slot as active.",
  "mammoth_postgres_slot_retained_wal_bytes" => "WAL retained from the slot restart LSN.",
  "mammoth_postgres_slot_safe_wal_size_bytes" => "WAL bytes that may be written before the slot risks loss.",
  "mammoth_postgres_slot_wal_status" => "Current PostgreSQL WAL retention status for the slot.",
  "mammoth_postgres_slot_invalidated" => "1 when PostgreSQL reports invalidation or conflict.",
  "mammoth_postgres_slot_inactive_since_timestamp_seconds" => "Unix timestamp when the slot became inactive.",
  "mammoth_postgres_slot_restart_lsn_bytes" => "Numeric PostgreSQL restart LSN.",
  "mammoth_postgres_slot_confirmed_flush_lsn_bytes" => "Numeric PostgreSQL confirmed flush LSN."
}.freeze