Using different jobs to scrape different groups of same exporters. At the 
same time I would like to make alerting rules be clean by introducing 
recording rules. My question is following approach fine? I understand that 
in expr you can use logical operators, but than if recording metric is used 
for calculation some other recorded metrics it's going to break or get to 
complicated. Is there a clean way?
  groups:
    - name: node-exporter.rules
      rules:
      - expr: |
          count without (cpu) (
            count without (mode) (
              node_cpu_seconds_total{job="node_1"}
            )
          )
        record: instance:node_num_cpu:sum
    - name: node-exporter.rules
      rules:
      - expr: |
          count without (cpu) (
            count without (mode) (
              node_cpu_seconds_total{job="node_2"}
            )
          )
        record: instance:node_num_cpu:sum

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/1cb02cd8-0621-4b14-ab9a-7cd6fe7038d8n%40googlegroups.com.

Reply via email to