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
name
with valueyourWebApplication
will automatically changed toyourWebApplication-metrics
.For the
selector
app.kubernetes.io/name
the keyname
will be used without the praefix. This value must match the service you want to select.For each
serviceMonitor
you can add multipleendpoints
.endpoints
requiresport
andinterval
.path
andscheme
are optional.