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

Join two metrics as label to some other metric [HELP/DIRECTIONS needed] #2393

Closed
openmohan opened this Issue Feb 3, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@openmohan
Copy link

openmohan commented Feb 3, 2017

Hi,
I would like to make a join operation between two metrics and expect the metric values to be in single response.

Consider this situation :
ifOutOctets - which gives number of packets transmitted
(Response is << _ifOutOctets{ifAlias="bond1v4@bond1",ifDescr="bond1v4",ifIndex="8",ifName="bond1v4",instance="169.53.135.170",job="Vyatta"} value : 75392868_ >>)

ifInOctets - which gives number of packets received
(Response is << ifInOctets{ifAlias="bond1v4@bond1",ifDescr="bond1v4",ifIndex="8",ifName="bond1v4",instance="169.53.135.170",job="Vyatta"} value: 8996220>>)

ifSpeed - gives speed of interface
(Response is << _ifSpeed{ifAlias="bond1v4@bond1",ifDescr="bond1v4",ifIndex="8",ifName="bond1v4",instance="169.53.135.170",job="Vyatta"} value : 100000000_ >>)

I would like to join all these metrics to be queried using a single query and expected response be like
(ifSpeed{ifAlias="bond1v4@bond1",ifDescr="bond1v4",ifIndex="8",ifName="bond1v4",instance="169.53.135.170",job="Vyatta",ifInOctets:"8996220",ifOutOctets="75392868"} value : 100000000)

I can add ifInOctets and ifOutOctets as lookups in ifSpeed but that would create new time series data for each and every change in ifInOctets and ifOutOctets .
Please let me know if there is any other way to join these queries . Thanks in advance.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 3, 2017

This is not possible, values can't become labels. It sounds like whatever you're using to process this data needs to be able to handle multiple queries.

@openmohan

This comment has been minimized.

Copy link
Author

openmohan commented Feb 3, 2017

Thanks a lot @brian-brazil .

@lock

This comment has been minimized.

Copy link

lock bot commented Mar 24, 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 24, 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.