Kubernetes Monitoring Stack - Change Prometheus Global Scrape Interval

Posted February 16, 2021 1.1k views
DigitalOcean 1-Click Apps MarketplaceKubernetesDigitalOcean Managed Kubernetes

Hi, I installed the one click “Kubernetes Monitoring Stack” to my cluster justnow. I tried to check some metrics from the grafana dashboard but the prometheus scraping_interval config is too slow (defaults to 30s) for my usecase.

More explanation regarding the scraping_interval I talked about can be found here

I have tried editing various service monitor but was not successful. Is there anything I can try to change the setting? Any assistance would be much appreciated. Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hello, I have working on this package as well. After a lot of grief, it is my recommendation that you ONLY edit, the values.yaml file. This is designed to expose these configurable values. Then do a helm update. What is the values.yaml file you ask? Well go here:

pipe this to a file, called values.yaml. Then edit the this file with what you need to change. Then update the installation. This will overwrite the default values in the chart with your changes.

helm upgrade my-prometheus prometheus-community/kube-prometheus-stack –namespace monitoring -f values.yaml

Hope this helps

  • Hi Daxcor, thanks very much for your help. I came across this values.yml solution several time at other places but didn’t really know what it was about. Now it has been more clear.

    I think my confusion is because I used the 1 click install and there was no helm chart files on my local computer.

    What I did was create a new cluster, pull the prometheus-community/kube-prometheus-stack helm chart. Then edit the values.yml to changed the scrape_interval then use helm install. Thanks!