-
Notifications
You must be signed in to change notification settings - Fork 40
expose systemd's MemoryCurrent value in metrics #87
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
Conversation
Signed-off-by: Evgeni Golov <[email protected]>
|
Implementation seems fine. But doesn't this overlap with a number of different cAdvisor metrics? We've been trying to keep the |
|
Partially, I guess. You can certainly get the same numbers from cAdvisor (by looking at the cgroup systemd created), but given that systemd already has this data it felt natural to also export it here for setups that don't want/need all other features of cAdvisor? (The old, broken memory metrics were removed in #68 and you said "Keep only metrics provided by systemd itself." :) ) |
|
need this feature. |
@SuperQ I was just about to quote this exact commit when wondering about resource metrics for systemd units being gone in the recent master. I suppose it boils down to the question whether the systemd exporter should expose any resource metrics (and their limits) belonging to units? If you invoke provided accounting is enabled for the particular resources via e.g. Yes most if not all of those metrics will likely be available via cAdvisor since that exposes all of them cgroups. But it does so without any context of the system unit, apart from the slice name, right? There even is a switch (https://github.com/google/cadvisor/blob/fbd519ba03978d54cb54ea7ed8ab9d6e3dd64590/docs/runtime_options.md?plain=1#L14) to disable exporting anything but "real" containers since cAdvisor is actually all about "containers". |
|
I also would vote for this PR 👏 I am running systemd-exporter with this patch and it works great and I now have a trifecta of exporters working hand in hand:
It really would be great if this can be merged into the codebase! |
|
Hey guys, Just to understand the intention of this exporter. I came accross this exporter due it's capability to provide resource usage metrics (e.g. CPU and Memory) per systemd unit, apperantly this is not the case any longer. If we won't add support for CPU/Memory (such as this PR does), I'm wondering what's the scope of this exporter and how it is any better to what is exported by the |
|
I'd like to reiterate the questions and ideas of basically everyone else in this thread. What is the scope of this exporter? As a concrete example, why are memory accounting stats (apparently) not in-scope, whereas IP accounting stats are? Particularly when this PR fetches mem stats over DBus in basically the same way as IP stats are fetched (afaiu; see As a new user of this exporter, I'm very much interested in surfacing unit stats that systemd presents to the user via its command-line and DBus interfaces. I can certainly understand the purity argument that bringing cgroup stats into this exporter is some kind of redundancy or layering violation. But I would argue in response that having such stats in this exporter is very useful in a way that (from my user perspective) should surely outweigh the purity/layering considerations. The systemd people evidently thought so too when they decided to include these stats in systemd's own interfaces. At this point, I'd be quite happy to bring this PR up-to-date with HEAD and even add any other dbus-provided metrics that people here would be interested in. However, it'd be really helpful to hear from the maintainer(s) about the possibility of actually merging this functionality. @SuperQ? |
|
@evgeni, I've rebased this PR against If you want to force-push my rebased version to your branch for this PR, please feel free to do that or suggest any other route your prefer. In the meantime, I think I'll start adding CPU accounting. |
|
I don't care/need this anymore. Feel free to open a new PR and use my code. |
|
I've opened #172 with CPU, Memory, and IO Accounting. Any feedback there would certainly be welcome! |
No description provided.