serviceMonitor¶
To add a serviceMonitor to monitoring add the following to values.yaml.
yaml
monitoring:
- name: yourWebApplication
namespace: monitoring
release: prometheus
endpoints:
- port: metrics
interval: 15s
path: merics
scheme: http
- port: metrics-init
interval: 60s
- name: yourService
namespace: monitoring
release: prometheus
endpoints:
- port: metrics-init
interval: 60s
You can add multiple serviceMonitor to
monitoring.In this example the key
namewith valueyourWebApplicationwill automatically changed toyourWebApplication-metrics.For the
selectorapp.kubernetes.io/namethe keynamewill be used without the praefix. This value must match the service you want to select.For each
serviceMonitoryou can add multipleendpoints.endpointsrequiresportandinterval.pathandschemeare optional.