Use flags instead of config and remove attributes
This commit is contained in:
parent
5b20dad9ad
commit
665b05eedc
23 changed files with 87 additions and 162 deletions
|
|
@ -26,7 +26,7 @@ var (
|
|||
)
|
||||
|
||||
type diskstatsCollector struct {
|
||||
config Config
|
||||
|
||||
ignoredDevicesPattern *regexp.Regexp
|
||||
metrics []prometheus.Collector
|
||||
}
|
||||
|
|
@ -35,13 +35,12 @@ func init() {
|
|||
Factories["diskstats"] = NewDiskstatsCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// disk device stats.
|
||||
func NewDiskstatsCollector(config Config) (Collector, error) {
|
||||
func NewDiskstatsCollector() (Collector, error) {
|
||||
var diskLabelNames = []string{"device"}
|
||||
|
||||
return &diskstatsCollector{
|
||||
config: config,
|
||||
ignoredDevicesPattern: regexp.MustCompile(*ignoredDevices),
|
||||
// Docs from https://www.kernel.org/doc/Documentation/iostats.txt
|
||||
metrics: []prometheus.Collector{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue