diff --git a/pkg/operator/ceph/cluster/mgr/mgr.go b/pkg/operator/ceph/cluster/mgr/mgr.go index f72db4b1ed170..99e0c579d56e3 100644 --- a/pkg/operator/ceph/cluster/mgr/mgr.go +++ b/pkg/operator/ceph/cluster/mgr/mgr.go @@ -400,6 +400,12 @@ func (c *Cluster) configurePrometheusModule() error { logger.Infof("prometheus config will change, interval: %v", interval) } + // Disable fetching of performance counters from the prometheus exporter as ceph-exporter is enabled for 4.14 + err = monStore.Set("mgr", "mgr/prometheus/exclude_perf_counters", "true") + if err != nil { + return errors.Wrapf(err, "failed to enable exclude_perf_counters") + } + if portHasChanged || intervalHasChanged { logger.Info("prometheus config has changed. restarting the prometheus module") return c.restartMgrModule(PrometheusModuleName) diff --git a/pkg/operator/ceph/cluster/mgr/mgr_test.go b/pkg/operator/ceph/cluster/mgr/mgr_test.go index b161bd1619a84..515041f443569 100644 --- a/pkg/operator/ceph/cluster/mgr/mgr_test.go +++ b/pkg/operator/ceph/cluster/mgr/mgr_test.go @@ -513,7 +513,7 @@ func TestCluster_configurePrometheusModule(t *testing.T) { assert.Equal(t, 2, modulesEnabled) assert.Equal(t, 1, modulesDisabled) assert.Equal(t, "30001", configSettings["mgr/prometheus/server_port"]) - assert.Equal(t, 1, len(configSettings)) + assert.Equal(t, 2, len(configSettings)) modulesEnabled = 0 modulesDisabled = 0 @@ -527,7 +527,7 @@ func TestCluster_configurePrometheusModule(t *testing.T) { assert.Equal(t, 2, modulesEnabled) assert.Equal(t, 1, modulesDisabled) assert.Equal(t, "30001", configSettings["mgr/prometheus/server_port"]) - assert.Equal(t, 1, len(configSettings)) + assert.Equal(t, 2, len(configSettings)) // Enable prometheus module, port and interval changed modulesEnabled = 0