-
Notifications
You must be signed in to change notification settings - Fork 51
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 client statistics #75
Conversation
I feel pretty good about the types but definitely want the names looked at closely. |
{"filestotal", "inodes_maximum", "The maximum number of inodes (objects) the filesystem can hold", s.gaugeMetric}, | ||
{"kbytesavail", "kilobytes_available", "Number of kilobytes readily available in the pool", s.gaugeMetric}, | ||
{"kbytesfree", "kilobytes_free", "Number of kilobytes allocated to the pool", s.gaugeMetric}, | ||
{"kbytestotal", "kilobytes_capacity", "Capacity of the pool in kilobytes", s.gaugeMetric}, |
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.
I've got myself rethinking these metrics now (all the kilobytes_* ones). Should they actually be *_kilobytes instead?
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 does make sense, especially from a consistency standpoint. Echoing an offline discussion, we want to save this for another PR, correct?
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.
Yes, correct.
sources/procfs.go
Outdated
{"kbytesfree", "kilobytes_free", "Number of kilobytes allocated to the pool", s.gaugeMetric}, | ||
{"kbytestotal", "kilobytes_capacity", "Capacity of the pool in kilobytes", s.gaugeMetric}, | ||
{"lazystatfs", "lazystatfs", "Returns '1' if lazystatfs (a non-blocking alternative to statfs) is enabled for the client", s.gaugeMetric}, | ||
{"max_easize", "max_easize", "Maximum Extended Attribute (EA) size in bytes", s.gaugeMetric}, |
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.
max_easize_bytes
sources/procfs.go
Outdated
{"stats", "write_minimum_size_bytes", writeMaximumHelp, s.gaugeMetric}, | ||
{"stats", "write_maximum_size_bytes", writeMaximumHelp, s.gaugeMetric}, | ||
{"stats", "write_bytes_total", writeTotalHelp, s.counterMetric}, | ||
{"xattr_cache", "xattr_cache", "Returns '1' if extended attribute cache is enabled", s.gaugeMetric}, |
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.
maybe rename xattr_cache_enabled?
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.
Works for me!
sources/procfs.go
Outdated
{"max_read_ahead_mb", "max_read_ahead_megabytes", "Maximum number of megabytes to read ahead", s.gaugeMetric}, | ||
{"max_read_ahead_per_file_mb", "max_read_ahead_per_file_megabytes", "Maximum number of megabytes per file to read ahead", s.gaugeMetric}, | ||
{"max_read_ahead_whole_mb", "max_read_ahead_whole_megabytes", "Maximum file size in megabytes for a file to be read in its entirety", s.gaugeMetric}, | ||
{"statahead_agl", "statahead_agl", "Returns '1' if the Asynchronous Glimpse Lock (AGL) for statahead is enabled", s.gaugeMetric}, |
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.
statahead_agl_enabled? Or maybe even worth expanding out to statahead_asynchronous_glimpse_lock_enabled...though that is super long...
6dee465
to
5e88e5b
Compare
Added |
sources/procfs.go
Outdated
{"kbytesfree", "kilobytes_free", "Number of kilobytes allocated to the pool", s.gaugeMetric}, | ||
{"kbytestotal", "kilobytes_capacity", "Capacity of the pool in kilobytes", s.gaugeMetric}, | ||
{"lazystatfs", "lazystatfs_enabled", "Returns '1' if lazystatfs (a non-blocking alternative to statfs) is enabled for the client", s.gaugeMetric}, | ||
{"max_easize", "max_easize_bytes", "Maximum Extended Attribute (EA) size in bytes", s.gaugeMetric}, |
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.
Worth adding an underscore to make it max_ea_size_bytes?
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.
Done!
1b11fa6
to
6a03511
Compare
sources/procfs.go
Outdated
{"max_read_ahead_per_file_mb", "max_read_ahead_per_file_megabytes", "Maximum number of megabytes per file to read ahead", s.gaugeMetric}, | ||
{"max_read_ahead_whole_mb", "max_read_ahead_whole_megabytes", "Maximum file size in megabytes for a file to be read in its entirety", s.gaugeMetric}, | ||
{"statahead_agl", "statahead_agl_enabled", "Returns '1' if the Asynchronous Glimpse Lock (AGL) for statahead is enabled", s.gaugeMetric}, | ||
{"statahead_max", "statahead_max", "Maximum window size for statahead", s.gaugeMetric}, |
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.
Should we make this statahead_maximum to comply with the precedent we just started with our other _maximum statistic?
sources/procfs.go
Outdated
{"max_easize", "max_ea_size_bytes", "Maximum Extended Attribute (EA) size in bytes", s.gaugeMetric}, | ||
{"max_read_ahead_mb", "max_read_ahead_megabytes", "Maximum number of megabytes to read ahead", s.gaugeMetric}, | ||
{"max_read_ahead_per_file_mb", "max_read_ahead_per_file_megabytes", "Maximum number of megabytes per file to read ahead", s.gaugeMetric}, | ||
{"max_read_ahead_whole_mb", "max_read_ahead_whole_megabytes", "Maximum file size in megabytes for a file to be read in its entirety", s.gaugeMetric}, |
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.
Should these three be maximum_*?
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.
I'm all for it, but do you mean the four max_
metrics? If it's just two, which ones and for what reason just for my curiosity?
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.
eh, yeah, I meant four. I edited the comment to say three, but clearly I can't count. Let's rephrase more clearly:
We should change any case of max to maximum instead. :)
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.
Haha, all good! Just wanted to clarify!
Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
6a03511
to
0d2619e
Compare
Phase 1 of fixing #69.
Signed-Off-By: Robert Clark robert.d.clark@hpe.com