From 9b001cb649b619d794ffe573a07b952b2bdc6c36 Mon Sep 17 00:00:00 2001 From: Joe Handzik Date: Wed, 17 May 2017 13:16:45 -0500 Subject: [PATCH] Tweak metric naming for file_* and *_now values 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 --- sources/procfs.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sources/procfs.go b/sources/procfs.go index 88191e80..9a2de6cc 100644 --- a/sources/procfs.go +++ b/sources/procfs.go @@ -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}, @@ -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}, @@ -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}, }, @@ -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}, },