Examples

Upstream Requests Total

Prometheus counter for requests that reached an upstream endpoint, labeled by cluster, endpoint and status class

Praxis v0.8.0 1 min read

Category: Practical
Task: Prometheus counter for requests that reached an upstream endpoint, labeled by cluster, endpoint and status class

Prerequisites: The product runtime and any backend services referenced by this configuration.

Run it: Use ghcr.io/praxis-proxy/praxis:0.8.0 and follow the first reverse-proxy tutorial to mount and start the configuration.

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

Download the source file.

# Upstream Requests Total
#
# Prometheus counter for requests that reached an upstream endpoint,
# labeled by cluster, endpoint and status class. Requests answered by the
# proxy itself are excluded, so the gap against praxis_http_requests_total
# is proxy-generated traffic. Scraped via the metrics listener.
#
admin:
  metrics_address: "127.0.0.1:9902"

insecure_options:
  allow_private_endpoints: true

listeners:
  - name: web
    address: "127.0.0.1:8080"
    filter_chains:
      - routing

filter_chains:
  - name: routing
    filters:
      - filter: router
        routes:
          - path_prefix: "/api/"
            cluster: backend
      - filter: load_balancer
        clusters:
          - name: backend
            endpoints:
              - "127.0.0.1:3000"