-
Task
-
Resolution: Done
-
Undefined
-
None
-
None
-
None
-
None
-
0
-
False
-
-
False
-
-
with https://issues.redhat.com/browse/MON-4444 merged to 4.21, PR: https://github.com/openshift/cluster-monitoring-operator/pull/2759
If the user configured a retention for user-workload Prometheus but did not explicitly set a retention for Thanos Ruler, default Thanos Ruler retention to the same value as Prometheus. This keeps the effective retention aligned, unless the user overrides it for Thanos Ruler.
explanation:
- configured a retention for user-workload Prometheus but did not explicitly set a retention for Thanos Ruler, default Thanos Ruler retention to the same value as Prometheus. This also include no user-workload promethues/thanos ruler retention settings.
no user-workload promethues/thanos ruler retention settings. default retention for user-workload promethues/thanos ruler is 24h
$ oc -n openshift-user-workload-monitoring get po thanos-ruler-user-workload-0 -oyaml | grep -i retention - --tsdb.retention=24h $ oc -n openshift-user-workload-monitoring get po prometheus-user-workload-0 -oyaml | grep -i retention - --storage.tsdb.retention.time=24h
set user-workload promethues retention only
apiVersion: v1 data: config.yaml: | prometheus: retention: 2d kind: ConfigMap metadata: name: user-workload-monitoring-config namespace: openshift-user-workload-monitoring
Thanos Ruler retention to the same value as user-workload Prometheus
$ oc -n openshift-user-workload-monitoring get po prometheus-user-workload-0 -oyaml | grep -i retention - --storage.tsdb.retention.time=2d $ oc -n openshift-user-workload-monitoring get po thanos-ruler-user-workload-0 -oyaml | grep -i retention - --tsdb.retention=2d
2. set different retention value for user-workload promethues/thanos ruler
$ oc -n openshift-user-workload-monitoring get cm user-workload-monitoring-config -oyaml apiVersion: v1 data: config.yaml: | prometheus: retention: 2d thanosRuler: retention: 36h kind: ConfigMap metadata: name: user-workload-monitoring-config namespace: openshift-user-workload-monitoring
thanos ruler would use its retention setting
$ oc -n openshift-user-workload-monitoring get po prometheus-user-workload-0 -oyaml | grep -i retention - --storage.tsdb.retention.time=2d $ oc -n openshift-user-workload-monitoring get po thanos-ruler-user-workload-0 -oyaml | grep -i retention - --tsdb.retention=36h
should add note `If the user configured a retention for user-workload Prometheus but did not explicitly set a retention for Thanos Ruler, default Thanos Ruler retention to the same value as Prometheus` to
- is documented by
-
OBSDOCS-2832 [docs] Default retention of thanos-ruler should be the same as prometheus user-workload
-
- Closed
-
- is duplicated by
-
OBSDOCS-2832 [docs] Default retention of thanos-ruler should be the same as prometheus user-workload
-
- Closed
-