Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion collector/runit.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,18 @@
package collector

import (
"flag"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"github.com/soundcloud/go-runit/runit"
)

var runitServiceDir = flag.String(
"collector.runit.servicecdir",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this is a typo: "servicecdir"?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. Will fix

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This typo is still present in v0.14.0-rc.1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whup, forgot that one!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed the fix to master, will show up in the final release.

"/etc/service",
"Path to runit service directory.")

type runitCollector struct {
state, stateDesired, stateNormal, stateTimestamp *prometheus.GaugeVec
}
Expand Down Expand Up @@ -81,7 +88,7 @@ func NewRunitCollector() (Collector, error) {
}

func (c *runitCollector) Update(ch chan<- prometheus.Metric) error {
services, err := runit.GetServices("/etc/service")
services, err := runit.GetServices(*runitServiceDir)
if err != nil {
return err
}
Expand Down