Add scrape_configs to Prometheus using Helm

9/13/2019

I'm trying to add an extra scrape config to my prometheus configuration. For the installation I use Helm Charts. So, what I did, I created a values.yaml file with

scrape_configs:
  - job_name: prometheus
    static_configs:
      - targets:
        - localhost:9090
  - job_name: myapp
    static_configs: 
      - targets: ["myapp-service:3000"]

And then I executed the following command

gt; helm install -f .
/values.yaml stable/prometheus

This will spin up prometheus which I can access. But when I check the configuration or the Targets there is nothing about myapp.

I get the feeling that I forget something here or incorrectly add targets to the prometheus chart. Any suggestions?

-- Jeanluca Scaljeri
kubernetes-helm
prometheus

0 Answers