diff --git a/agent/prometheus_scrape.go b/agent/prometheus_scrape.go index ab8cd153..2e177f2c 100644 --- a/agent/prometheus_scrape.go +++ b/agent/prometheus_scrape.go @@ -9,6 +9,7 @@ import ( func (a *Agent) startPrometheusScrape() { if coreconfig.Config == nil || + coreconfig.Config.Prometheus == nil || !coreconfig.Config.Prometheus.Enable { return } @@ -18,6 +19,7 @@ func (a *Agent) startPrometheusScrape() { func (a *Agent) stopPrometheusScrape() { if coreconfig.Config == nil || + coreconfig.Config.Prometheus == nil || !coreconfig.Config.Prometheus.Enable { return }