diff options
author | Calle Pettersson <carlpett@users.noreply.github.com> | 2017-09-28 15:06:26 +0200 |
---|---|---|
committer | Johannes 'fish' Ziemke <github@freigeist.org> | 2017-09-28 15:06:26 +0200 |
commit | 859a825bb84bf4fb911fcba445d410965945f088 (patch) | |
tree | 0726b08cf03c790bff3a34a085cecc01e3b927e2 /collector/interrupts_common.go | |
parent | 3762191e66e309106e930ab11f9c080fb4428001 (diff) | |
download | prometheus_node_collector-859a825bb84bf4fb911fcba445d410965945f088.tar.bz2 prometheus_node_collector-859a825bb84bf4fb911fcba445d410965945f088.tar.xz prometheus_node_collector-859a825bb84bf4fb911fcba445d410965945f088.zip |
Replace --collectors.enabled with per-collector flags (#640)
* Move NodeCollector into package collector
* Refactor collector enabling
* Update README with new collector enabled flags
* Fix out-of-date inline flag reference syntax
* Use new flags in end-to-end tests
* Add flag to disable all default collectors
* Track if a flag has been set explicitly
* Add --collectors.disable-defaults to README
* Revert disable-defaults flag
* Shorten flags
* Fixup timex collector registration
* Fix end-to-end tests
* Change procfs and sysfs path flags
* Fix review comments
Diffstat (limited to 'collector/interrupts_common.go')
-rw-r--r-- | collector/interrupts_common.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/collector/interrupts_common.go b/collector/interrupts_common.go index 2c8babb..b1c5f27 100644 --- a/collector/interrupts_common.go +++ b/collector/interrupts_common.go | |||
@@ -23,14 +23,14 @@ type interruptsCollector struct { | |||
23 | } | 23 | } |
24 | 24 | ||
25 | func init() { | 25 | func init() { |
26 | Factories["interrupts"] = NewInterruptsCollector | 26 | registerCollector("interrupts", defaultDisabled, NewInterruptsCollector) |
27 | } | 27 | } |
28 | 28 | ||
29 | // NewInterruptsCollector returns a new Collector exposing interrupts stats. | 29 | // NewInterruptsCollector returns a new Collector exposing interrupts stats. |
30 | func NewInterruptsCollector() (Collector, error) { | 30 | func NewInterruptsCollector() (Collector, error) { |
31 | return &interruptsCollector{ | 31 | return &interruptsCollector{ |
32 | desc: typedDesc{prometheus.NewDesc( | 32 | desc: typedDesc{prometheus.NewDesc( |
33 | Namespace+"_interrupts", | 33 | namespace+"_interrupts", |
34 | "Interrupt details.", | 34 | "Interrupt details.", |
35 | interruptLabelNames, nil, | 35 | interruptLabelNames, nil, |
36 | ), prometheus.CounterValue}, | 36 | ), prometheus.CounterValue}, |