From daec93eaaa65add60296a67c8fb3bdde8cbf9350 Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Wed, 13 Mar 2024 13:29:01 +0100 Subject: [PATCH] monitoring: increasing metrics scraping interval from 5s to 10s let's increase the monitoring interval to match the default interval used by Prometheus when deployed by Ceph: 10s Closes: https://github.com/rook/rook/issues/13883 Signed-off-by: Redouane Kachach --- pkg/operator/k8sutil/prometheus.go | 2 +- pkg/operator/k8sutil/prometheus_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/operator/k8sutil/prometheus.go b/pkg/operator/k8sutil/prometheus.go index b257731c2..ea9600237 100644 --- a/pkg/operator/k8sutil/prometheus.go +++ b/pkg/operator/k8sutil/prometheus.go @@ -63,7 +63,7 @@ func GetServiceMonitor(name string, namespace string, portName string) *monitori { Port: portName, Path: "/metrics", - Interval: "5s", + Interval: "10s", }, }, }, diff --git a/pkg/operator/k8sutil/prometheus_test.go b/pkg/operator/k8sutil/prometheus_test.go index 6802896c5..6da17ca44 100644 --- a/pkg/operator/k8sutil/prometheus_test.go +++ b/pkg/operator/k8sutil/prometheus_test.go @@ -27,7 +27,7 @@ func TestGetServiceMonitor(t *testing.T) { name := "rook-ceph-mgr" namespace := "rook-ceph" port := "http-metrics" - interval := monitoringv1.Duration("5s") + interval := monitoringv1.Duration("10s") servicemonitor := GetServiceMonitor(name, namespace, port) assert.Equal(t, name, servicemonitor.GetName()) assert.Equal(t, namespace, servicemonitor.GetNamespace())