update: add missing database collector code for func GetName() (#553)

This commit is contained in:
Pavan Sokke Nagaraj
2022-03-23 22:00:25 -04:00
committed by GitHub
parent 77a2475bd2
commit 3d7a255e32

View File

@@ -455,6 +455,18 @@ func (c *Collect) GetName() string {
collector = "http"
name = c.HTTP.CollectorName
}
if c.Postgres != nil {
collector = "postgres"
name = c.Postgres.CollectorName
}
if c.Mysql != nil {
collector = "mysql"
name = c.Mysql.CollectorName
}
if c.Redis != nil {
collector = "redis"
name = c.Redis.CollectorName
}
if c.Collectd != nil {
collector = "collectd"
name = c.Collectd.CollectorName