Skip to content

Wrong probe per second calculation #1820

Description

@sylr

Hi,

I've a pretty basic SLO:

apiVersion: pyrra.dev/v1alpha1
kind: ServiceLevelObjective
metadata:
  name: prometheus-metrics-endpoint-success
  namespace: monitoring
spec:
  alerting: {}
  description: ""
  indicator:
    bool_gauge:
      grouping:
      - instance
      - environment
      - customer
      metric: probe_success{instance=~".*/metrics"}
  target: "99.0"
  window: 7d
status:
  type: ConfigMap

In the webui the probe per second is wrong, my probe is executed every 5s so the rate should be 0.2, not 60.

Image

The generated query for the graph is:

sum by (instance, environment, customer) (count_over_time(probe_success{customer="acme",environment="development",instance="https://prometheus-server-eks-euw1-01.dev.acme.net/eks-acme-dev-euw1-01/metrics"}[5m]))
/ 1

The right query would be

sum by (instance, environment, customer) (count_over_time(probe_success{customer="acme",environment="development",instance="https://prometheus-server-eks-euw1-01.dev.acme.net/eks-acme-dev-euw1-01/metrics"}[5m]))
/ 5m

The / 1 at the end of the query should be replaced by / <timeframe> (5m in this case).

Regards.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions