prometheus hack to reduce disk pressure in non-prod environments

Here is a script to reduce monitoring disk pressure. It prunes the db.

cat << EOF > cluster-monitoring-config.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: cluster-monitoring-config
  namespace: openshift-monitoring
data:
  config.yaml: |
    prometheusK8s:
      retention: 1d
EOF
oc apply -f cluster-monitoring-config.yaml

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *