aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes 'fish' Ziemke <github@freigeist.org>2018-03-08 12:59:48 +0100
committerBen Kochie <superq@gmail.com>2018-03-08 12:59:48 +0100
commit424ca8e3224e018cbe7185f389a839c3787649a6 (patch)
treeb80660c70ef8ca295f3e4563385177afd5318e12
parent65e485c4e926083c8cb4baf36a8d80d16a963421 (diff)
downloadprometheus_node_collector-424ca8e3224e018cbe7185f389a839c3787649a6.tar.bz2
prometheus_node_collector-424ca8e3224e018cbe7185f389a839c3787649a6.tar.xz
prometheus_node_collector-424ca8e3224e018cbe7185f389a839c3787649a6.zip
Drop exec_ in boot_timestamp_seconds on *bsd (#839)
This closes #827.
-rw-r--r--collector/exec_bsd.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/collector/exec_bsd.go b/collector/exec_bsd.go
index d5f3db6..ca5099c 100644
--- a/collector/exec_bsd.go
+++ b/collector/exec_bsd.go
@@ -46,37 +46,37 @@ func NewExecCollector() (Collector, error) {
46 return &execCollector{ 46 return &execCollector{
47 sysctls: []bsdSysctl{ 47 sysctls: []bsdSysctl{
48 { 48 {
49 name: "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 architeture unsigned integer.",
51 mib: "vm.stats.sys.v_swtch", 51 mib: "vm.stats.sys.v_swtch",
52 }, 52 },
53 { 53 {
54 name: "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 architeture unsigned integer.",
56 mib: "vm.stats.sys.v_trap", 56 mib: "vm.stats.sys.v_trap",
57 }, 57 },
58 { 58 {
59 name: "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 architeture unsigned integer.",
61 mib: "vm.stats.sys.v_syscall", 61 mib: "vm.stats.sys.v_syscall",
62 }, 62 },
63 { 63 {
64 name: "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 architeture unsigned integer.",
66 mib: "vm.stats.sys.v_intr", 66 mib: "vm.stats.sys.v_intr",
67 }, 67 },
68 { 68 {
69 name: "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 architeture unsigned integer.",
71 mib: "vm.stats.sys.v_soft", 71 mib: "vm.stats.sys.v_soft",
72 }, 72 },
73 { 73 {
74 name: "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 architeture unsigned integer.",
76 mib: "vm.stats.vm.v_forks", 76 mib: "vm.stats.vm.v_forks",
77 }, 77 },
78 { 78 {
79 name: "boot_timestamp_seconds", 79 name: "boot_time_seconds",
80 description: "Unix time of last boot, including microseconds.", 80 description: "Unix time of last boot, including microseconds.",
81 mib: "kern.boottime", 81 mib: "kern.boottime",
82 dataType: bsdSysctlTypeStructTimeval, 82 dataType: bsdSysctlTypeStructTimeval,
@@ -95,7 +95,7 @@ func (c *execCollector) Update(ch chan<- prometheus.Metric) error {
95 95
96 ch <- prometheus.MustNewConstMetric( 96 ch <- prometheus.MustNewConstMetric(
97 prometheus.NewDesc( 97 prometheus.NewDesc(
98 prometheus.BuildFQName(namespace, "exec", m.name), 98 namespace+"_"+m.name,
99 m.description, 99 m.description,
100 nil, nil, 100 nil, nil,
101 ), prometheus.CounterValue, v) 101 ), prometheus.CounterValue, v)