Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why the rule "cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase1h" does not add {job="apiserver"} #2465

Open
haima95 opened this issue Jul 25, 2024 · 1 comment
Labels

Comments

@haima95
Copy link

haima95 commented Jul 25, 2024

What happened?

Did you expect to see some different?

How to reproduce it (as minimally and precisely as possible):

Environment

  • Prometheus Operator version:

    quay.io/prometheus-operator/prometheus-operator:v0.72.0

  • Kubernetes version information:

    kubectl version
    Client Version: v1.28.2
    Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
    Server Version: v1.28.11

  • Prometheus Logs:

why the rule "cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase1h" does not add {job="apiserver"} ???
`

  • expr: |
    sum by (cluster, verb, scope) (increase(apiserver_request_sli_duration_seconds_count{job="apiserver"}[1h]))
    record: cluster_verb_scope:apiserver_request_sli_duration_seconds_count:increase1h
    • expr: |
      sum by (cluster, verb, scope) (avg_over_time(cluster_verb_scope:apiserver_request_sli_duration_seconds_count:increase1h[30d]) * 24 * 30)
      record: cluster_verb_scope:apiserver_request_sli_duration_seconds_count:increase30d
    • expr: |
      sum by (cluster, verb, scope, le) (increase(apiserver_request_sli_duration_seconds_bucket[1h]))
      record: cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase1h
    • expr: |
      sum by (cluster, verb, scope, le) (avg_over_time(cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase1h[30d]) * 24 * 30)
      record: cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase30d
      `

then that will case the function in apiserver_request:availability30d get wrong value, the value is less than zero

`

write too slow

        sum by (cluster) (cluster_verb_scope:apiserver_request_sli_duration_seconds_count:increase30d{verb=~"POST|PUT|PATCH|DELETE"})
        -
        sum by (cluster) (cluster_verb_scope_le:apiserver_request_sli_duration_seconds_bucket:increase30d{verb=~"POST|PUT|PATCH|DELETE",le="1"})

`

image

Anything else we need to know?:

@haima95
Copy link
Author

haima95 commented Jul 25, 2024

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant