mirror of
https://github.com/fluxcd/flux2.git
synced 2026-02-09 01:07:27 +00:00
Add example podMonitor for prometheus
Signed-off-by: Patrick Ruckstuhl <patrick@ch.tario.org>
This commit is contained in:
parent
7d3c63ad74
commit
433492791b
1 changed files with 18 additions and 1 deletions
|
|
@ -54,7 +54,24 @@ If you wish to use your own Prometheus and Grafana instances, then you can impor
|
|||
|
||||
!!! hint
|
||||
Note that the toolkit controllers expose the `/metrics` endpoint on port `8080`.
|
||||
When using Prometheus Operator you should create `PodMonitor` objects to configure scraping.
|
||||
When using Prometheus Operator you should create a `PodMonitor` object for each controller to configure scraping.
|
||||
|
||||
```yaml
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: source-controller
|
||||
namespace: flux-system
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- flux-system
|
||||
selector:
|
||||
matchLabels:
|
||||
app: source-controller
|
||||
podMetricsEndpoints:
|
||||
- port: http-prom
|
||||
```
|
||||
|
||||
## Metrics
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue