-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add diskstats on Darwin #593
add diskstats on Darwin #593
Conversation
collector/diskstats_darwin.go
Outdated
{ | ||
typedDesc: typedDesc{ | ||
desc: prometheus.NewDesc( | ||
prometheus.BuildFQName(Namespace, diskSubsystem, "read_time_ms"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These metric names don't follow our best practices (base unit for time is seconds, counters should end on _total). I guess we need to decide whether we want to stay consistent with the current linux implementation, or avoid a breaking change for darwin users along the road. Eventually, we'll rename the linux metrics in a big breaking release.
I think I'd use better names here already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @grobie, all new metrics should follow the best practices (unless maybe all the exporter is doing is surfacing existing metrics name).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks reasonable to me in general, but the metrics names need changing.
collector/diskstats_darwin.go
Outdated
{ | ||
typedDesc: typedDesc{ | ||
desc: prometheus.NewDesc( | ||
prometheus.BuildFQName(Namespace, diskSubsystem, "read_time_ms"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed with @grobie, all new metrics should follow the best practices (unless maybe all the exporter is doing is surfacing existing metrics name).
I have renamed metrics to fit guideline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, LGTM!
I don't see an update to the |
Hrmm but why did the build pass then? |
|
I thought we make it never fetch but not sure where I got that from.. |
sorry, since I hadn't found |
Please don't edit vendor.json manually. Use
https://github.com/kardianos/govendor
…On Fri, Jun 9, 2017 at 1:11 PM kadota kyohei ***@***.***> wrote:
sorry, since I hadn't found vendor.json until today,
I put iostat package manually in vendor directory.
I'm going to fix vendor.json.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#593 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAANaBiE4iGLx1N0nYNxU6b7gq3lRTUuks5sCShWgaJpZM4NvB9r>
.
|
@grobie thank you for your mention. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@grobie What would this PR require next action? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last comment, looks good otherwise.
README.md
Outdated
@@ -24,7 +24,7 @@ Name | Description | OS | |||
arp | Exposes ARP statistics from `/proc/net/arp`. | Linux | |||
conntrack | Shows conntrack statistics (does nothing if no `/proc/sys/net/netfilter/` present). | Linux | |||
cpu | Exposes CPU statistics | Darwin, Dragonfly, FreeBSD, Linux | |||
diskstats | Exposes disk I/O statistics from `/proc/diskstats`. | Linux | |||
diskstats | Exposes disk I/O statistics from `/proc/diskstats`. | Darwin, Linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That description is not longer correct, Darwin doesn't have a proc filesystem. Either drop it or describe each source.
Awesome, thanks a lot for you contribution! 🎆 |
* Add diskstats collector for Darwin * Update year in the header * Update README.md * Add github.com/lufia/iostat to vendored packages * Change stats to follow naming guidelines * Add a entry of github.com/lufia/iostat into vendor.json * Remove /proc/diskstats from description
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.13.0 to 0.15.0. - [Commits](golang/sys@v0.13.0...v0.15.0) --- updated-dependencies: - dependency-name: golang.org/x/sys dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
I have implemented a part of diskstats metrics.
but below metrics are not implemented.