Skip to content

Instantly share code, notes, and snippets.

@tcolgate
Created January 25, 2017 11:52
Show Gist options
  • Select an option

  • Save tcolgate/8ed48280a46ae4460490ac45d93d6f54 to your computer and use it in GitHub Desktop.

Select an option

Save tcolgate/8ed48280a46ae4460490ac45d93d6f54 to your computer and use it in GitHub Desktop.
job_offset:events:offset_rate1h{offset="1d"} =
job:events:rate1h offset 1d
job_offset:events:offset_rate1h{offset="2d"} =
job:events:rate1h offset 2d
job_offset:events:offset_rate1h{offset="3d"} =
job:events:rate1h offset 3d
@amerenda

amerenda commented Oct 4, 2018

Copy link
Copy Markdown

FYI, the new syntax for this is:

- record: job_offset:events:offset_rate1h
   expr: job:events:rate1h offset 1d
   labels:
     offset: 1d
- record: job_offset:events:offset_rate1h
   expr: job:events:rate1h offset 2d
   labels:
     offset: 2d
- record: job_offset:events:offset_rate1h
   expr: job:events:rate1h offset 3d
   labels:
     offset: 3d

@josepplaltg

Copy link
Copy Markdown

When I apply this config I only get the last offset definition, seems like the job_offset:events:offset_rate1h have the data of the last record rule, doesn't add the 3 offsets to the same metric

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