From 3d7a255e32cc8b06729b0068df7548e41ed529e9 Mon Sep 17 00:00:00 2001 From: Pavan Sokke Nagaraj Date: Wed, 23 Mar 2022 22:00:25 -0400 Subject: [PATCH] update: add missing database collector code for func GetName() (#553) --- pkg/apis/troubleshoot/v1beta2/collector_shared.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/apis/troubleshoot/v1beta2/collector_shared.go b/pkg/apis/troubleshoot/v1beta2/collector_shared.go index b315abd3..abb25842 100644 --- a/pkg/apis/troubleshoot/v1beta2/collector_shared.go +++ b/pkg/apis/troubleshoot/v1beta2/collector_shared.go @@ -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