Comments (6)
I like the idea, though it'll probably be an opt-in behaviour based on a command-line argument. I see two ways these metrics could be exposed. (1) Add a new template variable ThreadName that can be used in the template that builds groupnames. Or (2) add a ThreadName label to the CPU and IO metrics and break down all metrics of threaded processes accordingly. Unthreaded processes would have ThreadName=groupname. I'm leaning towards (2) because it would allow doing sum() over groupname to get the existing aggregate metrics. What do you think?
from process-exporter.
Yes, I think this should be optional/configurable, either globally or per process...
For exposing, (2) basically sounds good to me. I would even say the aggregated process metrics should be kept in any case, as this is way cheaper than summing again to get the whole process metrics.
But just saying that having ThreadName=groupname equals the whole process IMHO won't work then...
from process-exporter.
Maybe rather than adding a new dimension to the existing metrics, these per-threadname metrics should have new metric names altogether. Then we keep the aggregated process metrics as you suggest, and people can always use rewrite rules to selectively discard unneeded per-threadname metrics.
from process-exporter.
Well, that was way more disruptive than I expected, so don't be surprised if I broke something. I hadn't done any major work on this project since last year, and coming back to it now I found it was hard to understand. The good news is that I was able to make some of the APIs cleaner, I rewrote the tests to be more understandable (or at least more readable I hope), and we now have per-thread CPU/IO/page fault metrics. The format isn't exactly the same as used for the groupname statistics, but it does reflect where I think they're headed (see #21). Example:
namedprocess_namegroup_thread_count{groupname="chromium-browse",threadname="SimpleCacheWork"} 5
namedprocess_namegroup_thread_cpu_seconds_total{cpumode="system",groupname="chromium-browse",threadname="SimpleCacheWork"} 0.16999999999999993
namedprocess_namegroup_thread_cpu_seconds_total{cpumode="user",groupname="chromium-browse",threadname="SimpleCacheWork"} 0.07000000000000006
namedprocess_namegroup_thread_io_bytes_total{groupname="chromium-browse",iomode="read",threadname="SimpleCacheWork"} 7.613094e+06
namedprocess_namegroup_thread_io_bytes_total{groupname="chromium-browse",iomode="write",threadname="SimpleCacheWork"} 1.871672e+06
namedprocess_namegroup_thread_major_page_faults_total{groupname="chromium-browse",threadname="SimpleCacheWork"} 0
namedprocess_namegroup_thread_minor_page_faults_total{groupname="chromium-browse",threadname="SimpleCacheWork"} 505
I left major/minor page faults unmerged because I don't think it's sensible to sum them, which is what that would imply.
from process-exporter.
Sweet!!
Just one minor comment: maybe rename cpumode
to mode
to have the same naming as the prometheus node_exporter? But that is not really that important....
from process-exporter.
I thought about it, but it felt weird to qualify "iomode" but not "cpumode".
from process-exporter.
Related Issues (20)
- outdated link to Grafana dashboard HOT 2
- help!process_exporter Unable to start HOT 3
- namedprocess_namegroup_states is 1 more than namedprocess_namegroup_thread_count, which is the number of statistical threads. What is the reason?
- Process exporter optimization
- namedprocess_namegroup_worst_fd_ratio doesn't seem to work properly HOT 1
- zsh: exec format error: ./process-exporter HOT 1
- Is it possible to have process network io metrics?
- exec docker run cannot create a docker container
- Can we get the top 10 process in the machine which is having high cpu usage HOT 14
- How to monitor Java processes ? HOT 1
- grafana dasboard link 404 now
- can we also get cpu io_wait and idle time per process?
- Specifying threads flag in front of config flag causes the config to be ignored HOT 1
- How to differienciate mutile process with same process name? HOT 1
- While process-exporter restart,namedprocess_namegroup_cpu_seconds_total resets to zero
- Exe full and arguments HOT 4
- Remove process group when namedprocess_namegroup_num_procs = 0 HOT 4
- Not getting any namedprocess_namegroup_* metrics from process exporter HOT 1
- Not getting any process metrics from process exporter on Debian 12 (bookworm) HOT 2
- Default value to -62135596800 corresponding to 0001-01-01 when no process found
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from process-exporter.