service_name: prometheus
feature_name: metrics
slo_name: errors
slo_description: Valid HTTP code for > 99.9% of HTTP requests
slo_target: 0.999
backend:
  class: Prometheus
  measurement:
    expression: >
      sum(rate(prometheus_http_requests_total{code=~"2..", handler="/metrics"}[window]))
      /
      sum(rate(prometheus_http_requests_total{handler="/metrics"}[window]))
  method: sli
exporters:
  - class: Pubsub
    project_id: "${PUBSUB_PROJECT_ID}"
    topic_name: "${PUBSUB_TOPIC_NAME}"

service_name: prometheus
feature_name: metrics
slo_name: errors
slo_description: Valid HTTP code for > 99.9% of HTTP requests
slo_target: 0.999
backend:
  class: Prometheus
  url: http://localhost:9090
  # Basic auth example (NGINX):
  # headers:
  #   Content-Type: application/json
  #   Authorization: Basic b2s6cGFzcW==  # username:password base64-encoded
  measurement:
    expression: >
      sum(rate(prometheus_http_requests_total{code=~"2..", handler="/metrics"}[window]))
      /
      sum(rate(prometheus_http_requests_total{handler="/metrics"}[window]))
  method: sli
exporters:
  - class: Pubsub
    project_id: "${PUBSUB_PROJECT_ID}"
    topic_name: "${PUBSUB_TOPIC_NAME}"

Add auth example to Prometheus SLO example
Add auth example to Prometheus SLO example
