aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Kochie <superq@gmail.com>2018-04-09 20:32:43 +0200
committerGitHub <noreply@github.com>2018-04-09 20:32:43 +0200
commitbde511b5219e8fbe8284998fd4d839b24e8ce51f (patch)
treefe230cda1b5780dca22eac8fd2ef0f600f3c8177
parentefc1fdb6d0ea7554db381a99ace71768468359da (diff)
parent7e392e6634a0ab324d7896ca12ec0b853e25411f (diff)
downloadprometheus_node_collector-bde511b5219e8fbe8284998fd4d839b24e8ce51f.tar.bz2
prometheus_node_collector-bde511b5219e8fbe8284998fd4d839b24e8ce51f.tar.xz
prometheus_node_collector-bde511b5219e8fbe8284998fd4d839b24e8ce51f.zip
Merge pull request #888 from knweiss/typos
Fix spelling mistakes found by codespell
-rw-r--r--README.md2
-rw-r--r--collector/bcache_linux.go2
-rw-r--r--collector/exec_bsd.go12
-rw-r--r--collector/fixtures/e2e-output.txt2
-rw-r--r--collector/fixtures/e2e-ppc64le-output.txt2
-rw-r--r--collector/supervisord.go14
6 files changed, 17 insertions, 17 deletions
diff --git a/README.md b/README.md
index b3047af..a14de6d 100644
--- a/README.md
+++ b/README.md
@@ -109,7 +109,7 @@ mv /path/to/directory/role.prom.$$ /path/to/directory/role.prom
109 109
110### Filtering enabled collectors 110### Filtering enabled collectors
111 111
112The `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. 112The `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.
113 113
114For 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/#<scrape_config>). 114For 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/#<scrape_config>).
115 115
diff --git a/collector/bcache_linux.go b/collector/bcache_linux.go
index 800a030..56383f9 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
162 }, 162 },
163 { 163 {
164 name: "cache_available_percent", 164 name: "cache_available_percent",
165 desc: "Percentage of cache device without dirty data, useable for writeback (may contain clean cached data).", 165 desc: "Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).",
166 value: float64(s.Bcache.CacheAvailablePercent), 166 value: float64(s.Bcache.CacheAvailablePercent),
167 metricType: prometheus.GaugeValue, 167 metricType: prometheus.GaugeValue,
168 }, 168 },
diff --git a/collector/exec_bsd.go b/collector/exec_bsd.go
index ca5099c..3ee8479 100644
--- a/collector/exec_bsd.go
+++ b/collector/exec_bsd.go
@@ -47,32 +47,32 @@ func NewExecCollector() (Collector, error) {
47 sysctls: []bsdSysctl{ 47 sysctls: []bsdSysctl{
48 { 48 {
49 name: "exec_context_switches_total", 49 name: "exec_context_switches_total",
50 description: "Context switches since system boot. Resets at architeture unsigned integer.", 50 description: "Context switches since system boot. Resets at architecture unsigned integer.",
51 mib: "vm.stats.sys.v_swtch", 51 mib: "vm.stats.sys.v_swtch",
52 }, 52 },
53 { 53 {
54 name: "exec_traps_total", 54 name: "exec_traps_total",
55 description: "Traps since system boot. Resets at architeture unsigned integer.", 55 description: "Traps since system boot. Resets at architecture unsigned integer.",
56 mib: "vm.stats.sys.v_trap", 56 mib: "vm.stats.sys.v_trap",
57 }, 57 },
58 { 58 {
59 name: "exec_system_calls_total", 59 name: "exec_system_calls_total",
60 description: "System calls since system boot. Resets at architeture unsigned integer.", 60 description: "System calls since system boot. Resets at architecture unsigned integer.",
61 mib: "vm.stats.sys.v_syscall", 61 mib: "vm.stats.sys.v_syscall",
62 }, 62 },
63 { 63 {
64 name: "exec_device_interrupts_total", 64 name: "exec_device_interrupts_total",
65 description: "Device interrupts since system boot. Resets at architeture unsigned integer.", 65 description: "Device interrupts since system boot. Resets at architecture unsigned integer.",
66 mib: "vm.stats.sys.v_intr", 66 mib: "vm.stats.sys.v_intr",
67 }, 67 },
68 { 68 {
69 name: "exec_software_interrupts_total", 69 name: "exec_software_interrupts_total",
70 description: "Software interrupts since system boot. Resets at architeture unsigned integer.", 70 description: "Software interrupts since system boot. Resets at architecture unsigned integer.",
71 mib: "vm.stats.sys.v_soft", 71 mib: "vm.stats.sys.v_soft",
72 }, 72 },
73 { 73 {
74 name: "exec_forks_total", 74 name: "exec_forks_total",
75 description: "Number of fork() calls since system boot. Resets at architeture unsigned integer.", 75 description: "Number of fork() calls since system boot. Resets at architecture unsigned integer.",
76 mib: "vm.stats.vm.v_forks", 76 mib: "vm.stats.vm.v_forks",
77 }, 77 },
78 { 78 {
diff --git a/collector/fixtures/e2e-output.txt b/collector/fixtures/e2e-output.txt
index 0d997e7..645c75b 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
76# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache. 76# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache.
77# TYPE node_bcache_bypassed_bytes_total counter 77# TYPE node_bcache_bypassed_bytes_total counter
78node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0 78node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0
79# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, useable for writeback (may contain clean cached data). 79# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).
80# TYPE node_bcache_cache_available_percent gauge 80# TYPE node_bcache_cache_available_percent gauge
81node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100 81node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100
82# HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache. 82# 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 e52e196..5117638 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
76# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache. 76# HELP node_bcache_bypassed_bytes_total Amount of IO (both reads and writes) that has bypassed the cache.
77# TYPE node_bcache_bypassed_bytes_total counter 77# TYPE node_bcache_bypassed_bytes_total counter
78node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0 78node_bcache_bypassed_bytes_total{backing_device="bdev0",uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 0
79# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, useable for writeback (may contain clean cached data). 79# HELP node_bcache_cache_available_percent Percentage of cache device without dirty data, usable for writeback (may contain clean cached data).
80# TYPE node_bcache_cache_available_percent gauge 80# TYPE node_bcache_cache_available_percent gauge
81node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100 81node_bcache_cache_available_percent{uuid="deaddd54-c735-46d5-868e-f331c5fd7c74"} 100
82# HELP node_bcache_cache_bypass_hits_total Hits for IO intended to skip the cache. 82# 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 2a7aedc..20fa36f 100644
--- a/collector/supervisord.go
+++ b/collector/supervisord.go
@@ -116,17 +116,17 @@ func (c *supervisordCollector) Update(ch chan<- prometheus.Metric) error {
116 return err 116 return err
117 } 117 }
118 for _, info := range infos { 118 for _, info := range infos {
119 lables := []string{info.Name, info.Group} 119 labels := []string{info.Name, info.Group}
120 120
121 ch <- prometheus.MustNewConstMetric(c.stateDesc, prometheus.GaugeValue, float64(info.State), lables...) 121 ch <- prometheus.MustNewConstMetric(c.stateDesc, prometheus.GaugeValue, float64(info.State), labels...)
122 ch <- prometheus.MustNewConstMetric(c.exitStatusDesc, prometheus.GaugeValue, float64(info.ExitStatus), lables...) 122 ch <- prometheus.MustNewConstMetric(c.exitStatusDesc, prometheus.GaugeValue, float64(info.ExitStatus), labels...)
123 123
124 if c.isRunning(info.State) { 124 if c.isRunning(info.State) {
125 ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 1, lables...) 125 ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 1, labels...)
126 ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, float64(info.Now-info.Start), lables...) 126 ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, float64(info.Now-info.Start), labels...)
127 } else { 127 } else {
128 ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 0, lables...) 128 ch <- prometheus.MustNewConstMetric(c.upDesc, prometheus.GaugeValue, 0, labels...)
129 ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, 0, lables...) 129 ch <- prometheus.MustNewConstMetric(c.uptimeDesc, prometheus.CounterValue, 0, labels...)
130 } 130 }
131 log.Debugf("%s:%s is %s on pid %d", info.Group, info.Name, info.StateName, info.PID) 131 log.Debugf("%s:%s is %s on pid %d", info.Group, info.Name, info.StateName, info.PID)
132 } 132 }