graphite-project / graphite-web

A highly scalable real-time graphing system
http://graphite.readthedocs.org/
Apache License 2.0
5.87k stars 1.26k forks source link

[Q] diffSeries on multiple series comparing to a single serie #2795

Closed nikobearrr closed 1 year ago

nikobearrr commented 1 year ago

I have 3 series which give me their timestamps in milliseconds:

#A: service.abc.timestamp
#B: service.xyz.timestamp
#C: ervice.mno.timestamp

and I would like to compare them with real time. I use

#D: scale(time("now"), 1000)

as a series to get the current time in milliseconds.

What I can do now is specify them 1 by 1 and and do a diffSeries(), e.g.

diffSeries(#A, #D) will give me the service abc vs current time. diffSeries(#B, #D) will give me the service xyz vs current time.

What I would like to do, is do them on bulk. So for series #A I specify service.*.timestamp and then do diffSeries(#A, #D) and get the difference for any service that shows up.

I have tried the above, but that would not do it. As I understand it the diffSeries() compares 2 series and in the above case it combined the wildcard into 1.

My question is if what I would like is achievable and if yes how?

deniszh commented 1 year ago

You can try something like

applyByNode(service.*.timestamp,1,"diffSeries(%.timestamp,scale(time("now"), 1000))")
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.