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

sum by, irate and __name__ question #2441

Closed
matejkramny opened this Issue Feb 22, 2017 · 4 comments

Comments

Projects
None yet
2 participants
@matejkramny
Copy link

matejkramny commented Feb 22, 2017

What did you do?

I have data like:

system_cpu_system
system_cpu_user
system_cpu_steal
...
sum by(__name__)(irate({__name__=~"system_cpu_(system|user|steal|softirq|nice|iowait)"}[10s]))

screen shot 2017-02-21 at 22 53 25

What did you expect to see?

sum by(__name__)({__name__=~"system_cpu_(system|user|steal|softirq|nice|iowait)"})

screen shot 2017-02-21 at 22 52 49

What did you see instead? Under which circumstances?

The __name__ label (?) gets lost when using the irate function. There is ingestable data by irate as you can see:

screen shot 2017-02-21 at 22 56 16

I think I might not be doing this right, or this might be a bug.. I don't know how better to ask. I looked through numerous docs and tried many variations. Please help!

@matejkramny

This comment has been minimized.

Copy link
Author

matejkramny commented Feb 22, 2017

I can do this manually, but I'd like to know how it's possible using sum by

screen shot 2017-02-21 at 23 16 47

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Feb 22, 2017

When you apply a function to a metric, it's no longer that metric. Thus the name is removed. You need to do this by hand as you've figured out.

I'd suggest using the node exporter to get these metrics, as it has labels which make the processing easier.

@matejkramny

This comment has been minimized.

Copy link
Author

matejkramny commented Feb 22, 2017

Ok I see. My targets are firehol/netdata.

Thanks for responding & making this awesome project!

@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.