Added section for custom metrics target on top of default prometheus file 
from helm stable/prometheus



...DEFAULT



    - job_name: my_app_metrics

      scrape_interval: 5m

      scrape_timeout: 10s

      honor_labels: true

      metrics_path: /api/metrics

      kubernetes_sd_configs:

      - role: service

        selectors:

          - role:  "service"

            label: "name=myapp"

...DEFAULT 



To target my service configured as


apiVersion: v1



kind: Service

metadata:

  name: myapp

  namespace: production

spec:

  selector:

    name: myapp

    deployment: production

  type: ClusterIP

  ports:

    - port: 80

      targetPort: 5000

      protocol: TCP


I have restarted the prometheus pod, by deleting the existing one still my 
custom metric is not listed in /targets of prometheus

Prometheus version: 11.3.0

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/4014e02a-fca7-4b43-804b-edac8fe6ab8fo%40googlegroups.com.

Reply via email to