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

Recording rule is different from the recorded expression #3104

Closed
Cplo opened this Issue Aug 22, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@Cplo
Copy link

Cplo commented Aug 22, 2017

What did you do?
I define the following recording rules:

node_exporter:node_cpu_use:percent{} = 100 * (1 - avg(rate(node_cpu{mode="idle"}[2m])) BY (instance, job))
node_exporter:node_cpu_mode_use:percent{} = 100 * avg(rate(node_cpu[2m])) BY (instance, mode)
node_exporter:node_mem_use:percent{} = 100 * (1 - (node_memory_MemFree + node_memory_Cached + node_memory_Buffers) / (1 + node_memory_MemTotal))
node_exporter:node_disk_use:percent{} = 100 * (1 - node_filesystem_free{device=~"/dev.*",mountpoint!~"/etc.*|/run.*"} / (1 + node_filesystem_size))
node_exporter:node_swapmem_use:percent{} = 100 * (node_memory_SwapTotal - node_memory_SwapFree) / (node_memory_SwapTotal + 1)
node_exporter:node_disk_util:percent{} = irate(node_disk_io_time_ms[2m]) / 10
node_exporter:node_disk_bytes_read{} = irate(node_disk_bytes_read[2m])
node_exporter:node_disk_bytes_write{} = irate(node_disk_bytes_written[2m])
node_exporter:node_disk_iops_read{} = irate(node_disk_reads_completed[2m])
node_exporter:node_disk_iops_write{} = irate(node_disk_writes_completed[2m])
node_exporter:node_disk_context_switches{} = irate(node_context_switches[2m])
node_exporter:node_network_receive_bytes{} = irate(node_network_receive_bytes[2m])
node_exporter:node_network_transmit_bytes{} = irate(node_network_transmit_bytes[2m])
node_exporter:node_time_diff{} = node_time - scalar(node_time{instance="tosqatest1"})

the metric node_exporter:node_time_diff value never changed,but the expression node_time - scalar(node_time{instance="tosqatest1"}) value normally changed by per job scrape interval (1 minute).

2017-08-22 12-56-55
2017-08-22 12-56-48

What did you expect to see?
recording rule also change normally.
What did you see instead? Under which circumstances?

Environment

  • System information:

    Linux 4.4.73-1.el7.elrepo.x86_64 x86_64

  • Prometheus version:
    prometheus, version 1.7.1 (branch: master, revision: 3afb3ff)
    build user: root@0aa1b7fc430d
    build date: 20170612-11:44:05
    go version: go1.8.3

  • Prometheus configuration file:

N/A
@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Aug 22, 2017

I don't see anything odd here, query_range executes every 3s here while I presume your recording rule has a 1 minute interval. These are normal artifacts.

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 23, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 23, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.