Skip to content
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

cpu counter label mismatch between Darwin and FreeBSD? #414

Closed
justinclift opened this issue Jan 10, 2017 · 4 comments
Closed

cpu counter label mismatch between Darwin and FreeBSD? #414

justinclift opened this issue Jan 10, 2017 · 4 comments

Comments

@justinclift
Copy link

Trying out the new cpu counters on Darwin, the counter name is "node_cpu":

# HELP node_cpu Seconds the cpus spent in each mode.
# TYPE node_cpu counter
node_cpu{cpu="cpu0",mode="idle"} 440807.2265625
node_cpu{cpu="cpu0",mode="nice"} 0
node_cpu{cpu="cpu0",mode="system"} 92817.453125
node_cpu{cpu="cpu0",mode="user"} 79377.7421875
node_cpu{cpu="cpu1",mode="idle"} 588251.2578125
node_cpu{cpu="cpu1",mode="nice"} 0
node_cpu{cpu="cpu1",mode="system"} 15171.109375
node_cpu{cpu="cpu1",mode="user"} 9577.2265625
node_cpu{cpu="cpu2",mode="idle"} 500066.6484375
node_cpu{cpu="cpu2",mode="nice"} 0
node_cpu{cpu="cpu2",mode="system"} 49800.625
node_cpu{cpu="cpu2",mode="user"} 63132.8046875
node_cpu{cpu="cpu3",mode="idle"} 588163.0546875
node_cpu{cpu="cpu3",mode="nice"} 0
node_cpu{cpu="cpu3",mode="system"} 15204.59375
node_cpu{cpu="cpu3",mode="user"} 9631.8359375
node_cpu{cpu="cpu4",mode="idle"} 503780.65625
node_cpu{cpu="cpu4",mode="nice"} 0
node_cpu{cpu="cpu4",mode="system"} 47630.3046875
node_cpu{cpu="cpu4",mode="user"} 61588.921875
node_cpu{cpu="cpu5",mode="idle"} 588132.34375
node_cpu{cpu="cpu5",mode="nice"} 0
node_cpu{cpu="cpu5",mode="system"} 15241.3984375
node_cpu{cpu="cpu5",mode="user"} 9625.640625
node_cpu{cpu="cpu6",mode="idle"} 505016.109375
node_cpu{cpu="cpu6",mode="nice"} 0
node_cpu{cpu="cpu6",mode="system"} 46982.6953125
node_cpu{cpu="cpu6",mode="user"} 61000.8984375
node_cpu{cpu="cpu7",mode="idle"} 588084.4375
node_cpu{cpu="cpu7",mode="nice"} 0
node_cpu{cpu="cpu7",mode="system"} 15281.40625
node_cpu{cpu="cpu7",mode="user"} 9633.4296875

Looking at the cpu counter for FreeBSD, it seems to be called "node_cpu_seconds_total":

# HELP node_cpu_seconds_total Seconds the CPU spent in each mode.
# TYPE node_cpu_seconds_total counter
node_cpu_seconds_total{cpu="0",mode="idle"} 4617.086614173229
node_cpu_seconds_total{cpu="0",mode="interrupt"} 35.92913385826772
node_cpu_seconds_total{cpu="0",mode="nice"} 0
node_cpu_seconds_total{cpu="0",mode="system"} 2665.818897637795
node_cpu_seconds_total{cpu="0",mode="user"} 15176.952755905511
node_cpu_seconds_total{cpu="1",mode="idle"} 4609.724409448819
node_cpu_seconds_total{cpu="1",mode="interrupt"} 9.291338582677165
node_cpu_seconds_total{cpu="1",mode="nice"} 0
node_cpu_seconds_total{cpu="1",mode="system"} 2567.0236220472443
node_cpu_seconds_total{cpu="1",mode="user"} 15307.976377952757
node_cpu_seconds_total{cpu="2",mode="idle"} 4441.716535433071
node_cpu_seconds_total{cpu="2",mode="interrupt"} 8.338582677165354
node_cpu_seconds_total{cpu="2",mode="nice"} 0
node_cpu_seconds_total{cpu="2",mode="system"} 2511.6535433070867
node_cpu_seconds_total{cpu="2",mode="user"} 15532.307086614173
node_cpu_seconds_total{cpu="3",mode="idle"} 4590.393700787402
node_cpu_seconds_total{cpu="3",mode="interrupt"} 107.97637795275591
node_cpu_seconds_total{cpu="3",mode="nice"} 0
node_cpu_seconds_total{cpu="3",mode="system"} 2463.968503937008
node_cpu_seconds_total{cpu="3",mode="user"} 15331.677165354331

If they're for the same thing (seems to be?), shouldn't they use the same metric name to make things easier for cross-platform measurement comparison?

Pointing it out because it's making things a bit tricky with the default/example node exporter dashboards in Grafana. 😉

@justinclift
Copy link
Author

Hmmmm, thinking about this more, it may not be useful to keep the same counter name across OS's. Pretty much everything other than CPU has different requirements, so using "one dashboard per OS" seems fairly mandatory for host monitoring.

@brian-brazil
Copy link
Contributor

The FreeBSD name is the better name, and we'll likely be changing the Linux one over to that at some point in the future.

@justinclift
Copy link
Author

No worries. 😄

@discordianfish
Copy link
Member

I used node_cpu for darwin to stay consistent with linux, but yes the freebsd name is better. Guess it makes sense to renaming them all together at some point. Going to close this here in favor of #150 which discusses consolidating of the metrics.

tamcore pushed a commit to gitgrave/node_exporter that referenced this issue Oct 22, 2024
* fixed arp table mac address parsing

- Added ARPEntry.Flags field related to entry flags
- Added ARPEntry.IsComplete() to check if entry is complete
- Fixed mac address parsing and error handling
- Test improved with incomplete entry information
Closes prometheus#413.

Signed-off-by: Serhii Zasenko <sergii@zasenko.name>

* Arp flag const names cleanup

Signed-off-by: Serhii Zasenko <sergii@zasenko.name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants