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
|
|
@ -25,7 +25,7 @@ var (
|
|||
)
|
||||
|
||||
type filesystemCollector struct {
|
||||
config Config
|
||||
|
||||
ignoredMountPointsPattern *regexp.Regexp
|
||||
|
||||
size, free, avail, files, filesFree *prometheus.GaugeVec
|
||||
|
|
@ -35,13 +35,13 @@ func init() {
|
|||
Factories["filesystem"] = NewFilesystemCollector
|
||||
}
|
||||
|
||||
// Takes a config struct and prometheus registry and returns a new Collector exposing
|
||||
// Takes a prometheus registry and returns a new Collector exposing
|
||||
// network device filesystems.
|
||||
func NewFilesystemCollector(config Config) (Collector, error) {
|
||||
func NewFilesystemCollector() (Collector, error) {
|
||||
var filesystemLabelNames = []string{"filesystem"}
|
||||
|
||||
return &filesystemCollector{
|
||||
config: config,
|
||||
|
||||
ignoredMountPointsPattern: regexp.MustCompile(*ignoredMountPoints),
|
||||
size: prometheus.NewGaugeVec(
|
||||
prometheus.GaugeOpts{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue