How to change the prometheus scrapeInterval #1548
Answered
by
betonetotbo
betonetotbo
asked this question in
Q&A
-
How can I change the default |
Beta Was this translation helpful? Give feedback.
Answered by
betonetotbo
Dec 13, 2021
Replies: 1 comment 3 replies
-
I found a way to do this after applying the manifests, with this command:
This will patch the PrometheusSpec object setting the |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
betonetotbo
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found a way to do this after applying the manifests, with this command:
kubectl -n monitoring patch prometheus/k8s --type=json --patch='[{"op":"replace","path":"/spec/scrapeInterval","value":"15s"}]'
This will patch the PrometheusSpec object setting the
scrapeInterval
to15s
. After a while theprometheus-operator
will apply this new configuration to the prometheus instance.