Tcp Active Connections

Prometheus gauge for TCP connections currently open per listener

Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.

Category: Setup-dependent integration
Task: Prometheus gauge for TCP connections currently open per listener

Prerequisites: The external service, credentials, or certificates referenced by this configuration.

This configuration comes from the selected release. The example has not been run here; external services are not bundled.

Download the source file.

# TCP Active Connections
#
# Prometheus gauge for TCP connections currently open per listener.
# Incremented on accept and decremented when the session ends, including
# early closes such as connect failures. Scraped via the health/metrics listener.
#
# Usage:
#   cargo run -p praxis-proxy -- -c examples/configs/observability/tcp-active-connections.yaml
#
# Exercise:
#   echo "hi" | nc localhost 5432
#   curl -s http://localhost:9902/metrics | grep tcp_active_connections

admin:
  metrics_address: "127.0.0.1:9902"

insecure_options:
  allow_private_upstreams: true

listeners:
  - name: postgres
    address: "127.0.0.1:5432"
    protocol: tcp
    upstream: "127.0.0.1:15432"