0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Prometheus メトリクスデータの保持期間を変更してみた

Last updated at Posted at 2023-06-05

OpenShiftにおけるPrometheusメトリクスデータの保持期間は、デフォルト15日間のようなので、24時間に変更してみました。

変更手順は下記の通りです。

・手順1
oc -n openshift-monitoring get configmap cluster-monitoring-config
・手順2
oc -n openshift-monitoring create configmap cluster-monitoring-config
・手順3
oc -n openshift-monitoring edit configmap cluster-monitoring-config
・手順4
下記を追記する。
data:
config.yaml: |
prometheusK8s:
retention: 24h
・手順5
OpenShift Web コンソールから変更内容を確認できます。
OpenShift Web コンソール.png

参考:https://access.redhat.com/documentation/ja-jp/openshift_container_platform/4.6/html/monitoring/modifying-retention-time-for-prometheus-metrics-data_configuring-the-monitoring-stack
参考:https://access.redhat.com/documentation/ja-jp/openshift_container_platform/4.1/html/monitoring/configuring-the-monitoring-stack

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?