Remove config from collectors.

This commit is contained in:
Siavash Safi 2015-06-23 18:19:18 +04:30
commit f7563fe7a2
5 changed files with 8 additions and 21 deletions

View file

@ -30,7 +30,6 @@ var (
)
type filesystemCollector struct {
config Config
ignoredMountPointsPattern *regexp.Regexp
size, free, avail, files, filesFree *prometheus.GaugeVec
@ -40,13 +39,11 @@ func init() {
Factories["filesystem"] = NewFilesystemCollector
}
// Takes a config struct and prometheus registry and returns a new Collector exposing
// network device filesystems.
func NewFilesystemCollector(config Config) (Collector, error) {
// filesystems stats.
func NewFilesystemCollector() (Collector, error) {
var filesystemLabelNames = []string{"filesystem"}
return &filesystemCollector{
config: config,
ignoredMountPointsPattern: regexp.MustCompile(*ignoredMountPoints),
size: prometheus.NewGaugeVec(
prometheus.GaugeOpts{