monitoring¶
Feature state: 0.7.0
monitoring
value in Kubedeploy allows controlling the parameters for deploying ServiceMonitor or PodMonitor objects.
Note
ServiceMonitor and PodMonitor objects are part of CRD definitions of Prometheus operator. Your cluster must have them installed first. If CRD is detected as missing, chart will skip their deployment.
Available values for monitoring
in Kubedeploy:
monitoring:
enabled: false # (1)
labels: {} # (2)
targetLabels: [] # (3)
scrapePort: metrics # (4)
scrapePath: /metrics # (5)
scrapeInterval: 20s # (6)
scrapeTimeout: 15s # (7)
scheme: http # (8)
tlsConfig: {} # (9)
metricRelabelings: [] # (10)
relabelings: [] # (11)
- Enable monitoring.
- Provide additional labels to the ServiceMonitor metadata
- Additional metric labels
- Provide named service port used for scraping
- Provide HTTP path to scrape for metrics.
- Provide interval at which metrics should be scraped
- Timeout after which the scrape is ended (must be less than scrapeInterval)
- HTTP scheme to use for scraping.
- TLS configuration to use when scraping the endpoint
- Provide additional metricRelabelings to apply to samples before ingestion.
- Provide additional relabelings to apply to samples before scraping
Info
If service.enabled
is True
, chart will generate ServiceMonitor
object, otherwise PodMonitor
will be used.
Enable metrics scraping for exporter container
In this simple example our additionalContainer is used as metrics exporter. Since it already exports metrics on port named metrics, all we need to do is enable monitoring and leave all the other values on default.
Enable metrics scraping for built-in application metrics
values.yaml | |
---|---|
If our application has built in metrics exporter on custom route, we can modify monitoring scrapePort
and scrapePath
.
See also: