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
This commit is contained in:
parent
3762191e66
commit
859a825bb8
58 changed files with 410 additions and 406 deletions
|
|
@ -35,7 +35,7 @@ type supervisordCollector struct {
|
|||
}
|
||||
|
||||
func init() {
|
||||
Factories["supervisord"] = NewSupervisordCollector
|
||||
registerCollector("supervisord", defaultDisabled, NewSupervisordCollector)
|
||||
}
|
||||
|
||||
// NewSupervisordCollector returns a new Collector exposing supervisord statistics.
|
||||
|
|
@ -52,25 +52,25 @@ func NewSupervisordCollector() (Collector, error) {
|
|||
return &supervisordCollector{
|
||||
client: client,
|
||||
upDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "up"),
|
||||
prometheus.BuildFQName(namespace, subsystem, "up"),
|
||||
"Process Up",
|
||||
labelNames,
|
||||
nil,
|
||||
),
|
||||
stateDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "state"),
|
||||
prometheus.BuildFQName(namespace, subsystem, "state"),
|
||||
"Process State",
|
||||
labelNames,
|
||||
nil,
|
||||
),
|
||||
exitStatusDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "exit_status"),
|
||||
prometheus.BuildFQName(namespace, subsystem, "exit_status"),
|
||||
"Process Exit Status",
|
||||
labelNames,
|
||||
nil,
|
||||
),
|
||||
uptimeDesc: prometheus.NewDesc(
|
||||
prometheus.BuildFQName(Namespace, subsystem, "uptime"),
|
||||
prometheus.BuildFQName(namespace, subsystem, "uptime"),
|
||||
"Process Uptime",
|
||||
labelNames,
|
||||
nil,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue