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
/proc/stat: absolute values vs normalization by USER_HZ #52
Comments
@cournape This is already happening, no? See https://github.com/prometheus/node_exporter/blob/master/collector/stat.go#L115 We will probably get rid of that sysconf call soon though, because it needs cgo, which doesn't work with cross-compilation. We have done some research and it seems |
Hm, not sure why I thought it wasn't, I will have to check the data again (I got the impression from the values itself, I did not look at the code, mea culpa). Some people change USER_HZ when compiling their kernel, and I think it is arch dependent, though that may be moot for an application written in go. On the topic of cpu stat, would adding features on a per-process basis (based on |
We'd generally encourage instrumenting individual applications with prometheus and getting not just the cpu/memory stats but also other stats relevant to your services. Having such information tied to the machine rather than the service makes monitoring much trickier, and node_exporter is fundamentally about the machine. |
Note also that when instrumenting any application via the Go client library (perhaps others already as well?), you automatically get CPU and other runtime stats included by default in that application's |
In some cases, per-service monitoring is not always practical/feasable (e.g. reverse proxies, DB). But I agree that when possible in-app monitoring is more tractable. |
We have the haproxy_exporter, and I believe someone's working on the various relational databases. |
Yeah. @cournape So as a guideline, we want to keep the node exporter all about things that are really tied to a machine, and keep service-specific metrics out of it (even if it's just CPU stats etc. about those services). Exceptions are for services that are really, really closely tied to a machine (like the gmond collector module). Note that you can still always export anything you want from the node exporter (if needed) using the textfile collector module. |
So the idea is to have this kind of monitoring split in separate services. Makes sense. |
Yep. Regarding If we ignore that case, it seems there are only 2 exceptions to ia64: configurable (it matches |
(and ia64 and alpha are not platforms for which Go is available) |
by hardcoding `USER_HZ` (aka. `_SC_CLK_TCK`) to 100, which it is for all platforms Go supports. See prometheus#52 for discussion around this too. Closes prometheus#52.
Disable cpu info metric on non x86 arches
Would you consider reporting the cpu-related info from
/proc/stat
inticks / sysconf(_SC_CLK_TCK)
instead of ticks ? It would make comparison between VMs and across kernel more robust ?The text was updated successfully, but these errors were encountered: