diff --git a/README.md b/README.md index b3047af0..a14de6df 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom ### Filtering enabled collectors -The `node_exporter` will expose all metrics from enabled collectors by default. This is the recommended way to collect metrics to avoid errors when comparing metrics of different familes. +The `node_exporter` will expose all metrics from enabled collectors by default. This is the recommended way to collect metrics to avoid errors when comparing metrics of different families. For advanced use the `node_exporter` can be passed an optional list of collectors to filter metrics. The `collect[]` parameter may be used multiple times. In Prometheus configuration you can use this syntax under the [scrape config](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#). diff --git a/collector/bcache_linux.go b/collector/bcache_linux.go index 800a030c..56383f98 100644 --- a/collector/bcache_linux.go +++ b/collector/bcache_linux.go @@ -162,7 +162,7 @@ func (c *bcacheCollector) updateBcacheStats(ch chan<- prometheus.Metric, s *bcac }, { name: "cache_available_percent", - desc: "Percentage of cache device without dirty data, useable for writeback (may contain clean cached data).", + desc: "Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).", value: float64(s.Bcache.CacheAvailablePercent), metricType: prometheus.GaugeValue, }, diff --git a/collector/exec_bsd.go b/collector/exec_bsd.go index ca5099cd..3ee84798 100644 --- a/collector/exec_bsd.go +++ b/collector/exec_bsd.go @@ -47,32 +47,32 @@ func NewExecCollector() (Collector, error) { sysctls: []bsdSysctl{ { name: "exec_context_switches_total", - description: "Context switches since system boot. Resets at architeture unsigned integer.", + description: "Context switches since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.sys.v_swtch", }, { name: "exec_traps_total", - description: "Traps since system boot. Resets at architeture unsigned integer.", + description: "Traps since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.sys.v_trap", }, { name: "exec_system_calls_total", - description: "System calls since system boot. Resets at architeture unsigned integer.", + description: "System calls since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.sys.v_syscall", }, { name: "exec_device_interrupts_total", - description: "Device interrupts since system boot. Resets at architeture unsigned integer.", + description: "Device interrupts since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.sys.v_intr", }, { name: "exec_software_interrupts_total", - description: "Software interrupts since system boot. Resets at architeture unsigned integer.", + description: "Software interrupts since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.sys.v_soft", }, { name: "exec_forks_total", - description: "Number of fork() calls since system boot. Resets at architeture unsigned integer.", + description: "Number of fork() calls since system boot. Resets at architecture unsigned integer.", mib: "vm.stats.vm.v_forks", }, { diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt index 0d997e70..645c75b1 100644 --- a/collector/fixtures/e2e-output.txt +++ b/collector/fixtures/e2e-output.txt @@ -76,7 +76,7 @@ node_bcache_btree_read_average_duration_seconds{uuid="deaddd54-c735-46d5-868e-f3 # HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache. # TYPE node_bcache_bypassed_bytes_total counter node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0 -# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, useable for writeback (may contain clean cached data). +# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data). # TYPE node_bcache_cache_available_percent gauge node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100 # HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache. diff --git a/collector/fixtures/e2e-ppc64le-output.txt b/collector/fixtures/e2e-ppc64le-output.txt index e52e1968..51176386 100644 --- a/collector/fixtures/e2e-ppc64le-output.txt +++ b/collector/fixtures/e2e-ppc64le-output.txt @@ -76,7 +76,7 @@ node_bcache_btree_read_average_duration_seconds{uuid="deaddd54-c735-46d5-868e-f3 # HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache. # TYPE node_bcache_bypassed_bytes_total counter node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0 -# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, useable for writeback (may contain clean cached data). +# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data). # TYPE node_bcache_cache_available_percent gauge node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100 # HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache. diff --git a/collector/supervisord.go b/collector/supervisord.go index 2a7aedc4..20fa36f4 100644 --- a/collector/supervisord.go +++ b/collector/supervisord.go @@ -116,17 +116,17 @@ func (c *supervisordCollector) Update(ch chan<- prometheus.Metric) error { return err } for _, info := range infos { - lables := []string{info.Name, info.Group} + labels := []string{info.Name, info.Group} - ch <- prometheus.MustNewConstMetric(c.stateDesc, prometheus.GaugeValue, float64(info.State), lables...) - ch <- prometheus.MustNewConstMetric(c.exitStatusDesc, prometheus.GaugeValue, float64(info.ExitStatus), lables...) + ch <- prometheus.MustNewConstMetric(c.stateDesc, prometheus.GaugeValue, float64(info.State), labels...) + ch <- prometheus.MustNewConstMetric(c.exitStatusDesc, prometheus.GaugeValue, float64(info.ExitStatus), labels...) if c.isRunning(info.State) { - ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 1, lables...) - ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, float64(info.Now-info.Start), lables...) + ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 1, labels...) + ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, float64(info.Now-info.Start), labels...) } else { - ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 0, lables...) - ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, 0, lables...) + ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 0, labels...) + ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, 0, labels...) } log.Debugf("%s:%s is %s on pid %d", info.Group, info.Name, info.StateName, info.PID) }