Skip to content

Add cpu_openbsd - #727

Closed
mguegan wants to merge 3 commits into
prometheus:masterfrom
mguegan:add-cpu_openbsd
Closed

mguegan wants to merge 3 commits into
prometheus:masterfrom
mguegan:add-cpu_openbsd

Conversation

@mguegan

@mguegan mguegan commented Nov 6, 2017

Copy link
Copy Markdown

This PR will add support for OpenBSD CPU statistics. I have duplicated the cpu_freebsd code and tried to handle the main differences between both OS.

This was tested on 6.2R :

  • 1 CPU / KVM
  • dedicated hardware 4 CPUs

@SuperQ

@discordianfish

Copy link
Copy Markdown
Member

Is there a way without that much code duplication?

@mguegan

mguegan commented Jan 4, 2018

Copy link
Copy Markdown
Author

@discordianfish I think it should be possible by sharing everything in common on both OSes into a common file. Maybe it could be done on a second pass in order to clean up all the mess around like #547 which has a much better approach than this one.

@discordianfish

Copy link
Copy Markdown
Member

Not sure if relying on @derekmarcotte to clean up stuff is a good pattern :)
So since this here isn't a fix where I would be open to "clean up later" but a new feature, we should try to get it right the first time.

@zachfi

zachfi commented Jan 5, 2018

Copy link
Copy Markdown
Contributor

Anything else needed here? I'd love to be able to run node_exporter on my OpenBSD boxes.

@discordianfish

Copy link
Copy Markdown
Member

To be clear: Happy to merge this but first the common bits should be moved to a file that is shared with other freebsd.

@SuperQ SuperQ mentioned this pull request Jan 31, 2018
@SuperQ

SuperQ commented Feb 1, 2018

Copy link
Copy Markdown
Member

Sorry, we ended up going with #805, we still need to do some cleanup of code duplication in the *BSD collection.

@SuperQ SuperQ closed this Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants