Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

The results calculated by irate are different. #13996

Closed
Mr-Lee-long opened this issue Apr 28, 2024 · 0 comments
Closed

The results calculated by irate are different. #13996

Mr-Lee-long opened this issue Apr 28, 2024 · 0 comments

Comments

@Mr-Lee-long
Copy link

What did you do?

this is my expression: irate(node_cpu_seconds_total{cpu="0", env="product", instance="10.43.2.64", job="product_node-exporter", meta_consul_service_port="9100", mode="iowait", tags="kubernetes-nodes"}[1m])

i clicked the execute button in the 30s, and i got three different trend results.
and i only have one single data,no copy, no slave or multiple masters.

What did you expect to see?

I think the result should be the same every time, or much the same。

What did you see instead? Under which circumstances?

1、Most of the time like this.

WeChatWorkScreenshot_19b757ea-f243-4cb3-9f66-01ccaf6ae146

2、sometime like this.
WeChatWorkScreenshot_bacd4415-e4aa-4de2-9f5c-eb1b14021747

3、and like this.
WeChatWorkScreenshot_6da18e3f-f74f-4889-ac4c-45a8e1ce4777

System information

centos7.8 3.10.0-1160.99.1.el7.x86_64

Prometheus version

2.51.1

Prometheus configuration file

- job_name: '{{ ENV }}_node-exporter'
      scrape_interval: 30s
      honor_labels: true
      consul_sd_configs:
        - server: 'http://consul-svc.monitor.svc.cluster.local:8500'
          services: ["{{ ENV }}_node-exporter"]
      relabel_configs:
            - source_labels: [__meta_consul_tags]  #p05,kubenets_nodes
              separator: ;
              regex: \,(.*?)\,(.*)\,
              target_label: tags
              replacement: ${2}
              action: replace
            - source_labels: [__meta_consul_tagged_address]
              separator: ;
              regex: (.*)
              target_label: meta_consul_tagged_address
              replacement: ${1}
              action: replace
            - source_labels: [__meta_consul_metadata]
              separator: ;
              regex: (.*)
              target_label: meta_consul_metadata
              replacement: ${1}
              action: replace
            - source_labels: [__meta_consul_service_address]
              target_label: instance
            - source_labels: [instance]
              separator: ;
              regex: (xxx)
              action: drop
            - source_labels: [__meta_consul_service_metadata]
              separator: ;
              regex: (.*)
              target_label: meta_consul_service_metadata
              replacement: ${1}
              action: replace
            - source_labels: [__meta_consul_service_port]
              separator: ;
              regex: (.*)
              target_label: meta_consul_service_port
              replacement: ${1}
              action: replace
            - source_labels: [__meta_consul_service]
              separator: ;
              regex: (.+)-(.+)
              target_label: env
              replacement: ${1}
              action: replace
            - source_labels: [__meta_consul_service]
              separator: ;
              regex: (.+)_(.+)
              target_label: env
              replacement: ${1}
              action: replace

Alertmanager version

No response

Alertmanager configuration file

No response

Logs

No response

@prometheus prometheus locked and limited conversation to collaborators Apr 29, 2024
@roidelapluie roidelapluie converted this issue into discussion #13998 Apr 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant