Skip to content

Commit

Permalink
Tweak metric naming for file_* and *_now values
Browse files Browse the repository at this point in the history
Addresses issue #72 by removing plurality, moving from file to inode for naming purposes, and removing all cases of appending _now to metrics to denote instantaneous values.

Signed-Off-By: Joe Handzik <joseph.t.handzik@hpe.com>
  • Loading branch information
Joe Handzik committed May 17, 2017
1 parent 8fa85a6 commit 9b001cb
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions sources/procfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ func (s *lustreSource) generateOSTMetricTemplates() error {
{"brw_size", "brw_size_megabytes", "Block read/write size in megabytes", s.gaugeMetric},
{"brw_stats", "pages_per_bulk_rw_total", pagesPerBlockRWHelp, s.counterMetric},
{"brw_stats", "discontiguous_pages_total", discontiguousPagesHelp, s.counterMetric},
{"brw_stats", "disk_io_now", diskIOsInFlightHelp, s.gaugeMetric},
{"brw_stats", "disk_io", diskIOsInFlightHelp, s.gaugeMetric},
{"brw_stats", "io_time_milliseconds_total", ioTimeHelp, s.counterMetric},
{"brw_stats", "disk_io_total", diskIOSizeHelp, s.counterMetric},
{"degraded", "degraded_now", "Binary indicator as to whether or not the pool is degraded - 0 for not degraded, 1 for degraded", s.gaugeMetric},
{"filesfree", "files_free_now", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "file_capacity", "The maximum number of inodes (objects) the filesystem can hold", s.gaugeMetric},
{"degraded", "degraded", "Binary indicator as to whether or not the pool is degraded - 0 for not degraded, 1 for degraded", s.gaugeMetric},
{"filesfree", "inodes_free", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "inode_capacity", "The maximum number of inodes (objects) the filesystem can hold", s.gaugeMetric},
{"grant_compat_disable", "grant_compat_disabled", "Binary indicator as to whether clients with OBD_CONNECT_GRANT_PARAM setting will be granted space", s.gaugeMetric},
{"grant_precreate", "grant_precreate_capacity_bytes", "Maximum space in bytes that clients can preallocate for objects", s.gaugeMetric},
{"job_cleanup_interval", "job_cleanup_interval_seconds", "Interval in seconds between cleanup of tuning statistics", s.gaugeMetric},
Expand All @@ -165,8 +165,8 @@ func (s *lustreSource) generateOSTMetricTemplates() error {
{"job_stats", "job_get_info_total", getInfoHelp, s.counterMetric},
{"job_stats", "job_set_info_total", setInfoHelp, s.counterMetric},
{"job_stats", "job_quotactl_total", quotactlHelp, s.counterMetric},
{"kbytesavail", "kilobytes_available_now", "Number of kilobytes readily available in the pool", s.gaugeMetric},
{"kbytesfree", "kilobytes_free_now", "Number of kilobytes allocated to the pool", 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},
{"lfsck_speed_limit", "lfsck_speed_limit", "Maximum operations per second LFSCK (Lustre filesystem verification) can run", s.gaugeMetric},
{"num_exports", "exports_total", "Total number of times the pool has been exported", s.counterMetric},
Expand Down Expand Up @@ -258,10 +258,10 @@ func (s *lustreSource) generateMGSMetricTemplates() error {
metricMap := map[string][]lustreHelpStruct{
"mgs/MGS/osd/": {
{"blocksize", "blocksize_bytes", "Filesystem block size in bytes", s.gaugeMetric},
{"filesfree", "files_free_now", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "file_capacity", "The maximum number of inodes (objects) the filesystem can hold", s.gaugeMetric},
{"kbytesavail", "kilobytes_available_now", "Number of kilobytes readily available in the pool", s.gaugeMetric},
{"kbytesfree", "kilobytes_free_now", "Number of kilobytes allocated to the pool", s.gaugeMetric},
{"filesfree", "inodes_free", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "inode_capacity", "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},
{"quota_iused_estimate", "quota_iused_estimate", "Returns '1' if a valid address is returned within the pool, referencing whether free space can be allocated", s.gaugeMetric},
},
Expand All @@ -279,10 +279,10 @@ func (s *lustreSource) generateMDSMetricTemplates() error {
metricMap := map[string][]lustreHelpStruct{
"mds/MDS/osd": {
{"blocksize", "blocksize_bytes", "Filesystem block size in bytes", s.gaugeMetric},
{"filesfree", "files_free_now", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "file_capacity", "The maximum number of inodes (objects) the filesystem can hold", s.gaugeMetric},
{"kbytesavail", "kilobytes_available_now", "Number of kilobytes readily available in the pool", s.gaugeMetric},
{"kbytesfree", "kilobytes_free_now", "Number of kilobytes allocated to the pool", s.gaugeMetric},
{"filesfree", "inodes_free", "The number of inodes (objects) available", s.gaugeMetric},
{"filestotal", "inode_capacity", "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},
{"quota_iused_estimate", "quota_iused_estimate", "Returns '1' if a valid address is returned within the pool, referencing whether free space can be allocated", s.gaugeMetric},
},
Expand Down

0 comments on commit 9b001cb

Please # to comment.