Comments (3)
I'm confused: how would doing the calculation in the app instead of in promql help with the graphing?
Personally I'm only ever interested in the uptime to know if the app was restarted, which you can get with changes(namedprocess_namegroup_oldest_start_time_seconds[interval]).
from process-exporter.
At the moment, namedprocess_namegroup_oldest_start_time_seconds
would have the following data points (using very simplified examples):
Timestamp | start_time_seconds |
Explanation |
---|---|---|
09:00:00 | 1534924800 | Process started at 2018-08-22 08:00 |
09:30:00 | 1534924800 | Process is still running, so start time hasn't changed |
10:00:00 | 1534924800 | Process is still running, so start time hasn't changed |
10:30:00 | 1534932900 | Process restarted at 2018-08-22 10:15 |
11:00:00 | 1534932900 | Process is still running, so start time hasn't changed |
If I graph that using time()-namedprocess_namegroup_oldest_start_time_seconds
, I'd get the following points in my graph, depending on when I viewed it (since time()
is "now, when the graph is shown"):
Timestamp | Result at 11:00 | Result at 12:00 |
---|---|---|
09:00:00 | 3 hours | 4 hours |
09:30:00 | 3 hours | 4 hours |
10:00:00 | 3 hours | 4 hours |
10:30:00 | 45 minutes | 1 hour 45 mins |
11:00:00 | 45 mintues | 1 hour 45 mins |
However, if the process_exporter
information included an actual "uptime" for the process, I'd get values that were based on how long the process was running when the scrape took place, as so:
Timestamp | start_time_seconds |
uptime |
---|---|---|
09:00:00 | 1534924800 | 3600 |
09:30:00 | 1534924800 | 5400 |
10:00:00 | 1534924800 | 7200 |
10:30:00 | 1534932900 | 900 |
11:00:00 | 1534932900 | 2700 |
This would be very easy to graph, and would show a steadily rising line as processes ran, which then reset back to 0 when they were restarted.
If you can think of any other way to display this information, I'd be happy to do it in promql instead - I just can't figure out a way. I think I want scrape timestamp - start_time_seconds
, but I have no idea how to get that value.
Alternatively, if you've got a good way of showing how long processes have been running (not just how many time's they've restarted in a particular interval), I'll use that instead.
from process-exporter.
I'm currently running into the same issue - I'm trying to replace some old scripts that fed data into graphite with the process-exporter. The purpose is to show the runtime of several cronjobs, giving an indication how long each run takes and if any cronjobs are running abnormaly long. The result is a graph containing a sawtooth pattern.
So far I have not managed to formulate a promql query that will give me this result, a separate uptime gauge would be very useful here.
@Rocketeer007 have you found any solution for this in the meantime?
from process-exporter.
Related Issues (20)
- 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
- Unusual high number of involuntary context switches, how is this number computed?
- metric is not updated HOT 1
- High cardinality of Process Exporter metrics HOT 2
- /net/http/pprof were detected as information disclosure vulnerability
- need update gomod to fix CVE list HOT 2
- Process-exporter new release need with latest go and exporter toolkit HOT 7
- Process Exporter v0.7.11 is missing library GLIBC_2.34 HOT 1
- Failed to start the server: no web listen address or systemd socket flag specified HOT 1
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.