Add collectors for custom commands and /proc/diskstat. Per default add a hostname tag to all measurements

This commit is contained in:
Thomas Roehl
2021-10-08 13:29:57 +02:00
parent f74d5dc51a
commit dc4b8d13c2
3 changed files with 201 additions and 0 deletions

View File

@@ -28,6 +28,8 @@ var Collectors = map[string]collectors.MetricGetter{
"cpustat": &collectors.CpustatCollector{},
"topprocs": &collectors.TopProcsCollector{},
"nvidia": &collectors.NvidiaCollector{},
"customcmd": &collectors.CustomCmdCollector{},
"diskstat": &collectors.DiskstatCollector{},
}
var Sinks = map[string]sinks.SinkFuncs{
@@ -226,6 +228,7 @@ func main() {
}
}
config.Collectors = tmp
config.DefTags["hostname"] = host
// Setup up ticker loop
log.Print("Running loop every ", time.Duration(config.Interval)*time.Second)