Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 2242324: exporter: avoid fetching performance metrics from mgr/prometheus #564

Open
wants to merge 1 commit into
base: release-4.14
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pkg/operator/ceph/cluster/mgr/mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions pkg/operator/ceph/cluster/mgr/mgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading