All,
I have a common problem. I have a couple of clusters that I want to monitor
with a single prometheus instance that is outside of any of these clusters.
A high availabe prometheus server.
To do this, I want to deploy the prometheus operator in my cluster and
configure a /federate serviceMonitor endpoint. I can configure that using
the following template:
values.yaml
additionalServiceMonitors: []
- name: "federated-prometheus"
additionalLabels: {}
jobLabel: ""
targetLabels: ""
selector: {}
namespaceSelector:
any: false
matchNames: []
endpoints: []
- port: ""
- targetPort: ""
bearerTokenFile: ""
interval: 30s
path: /federation
scheme: http
tlsConfig:
caFile: ""
certFile: ""
insecureSkipVerify: false
keyFile: ""
serverName: ""
In my HA prometheus instance I can then scrape the /federate uri's of my
various kubernetes clusters.
This configurations looks a bit like this: (From the manual)
scrape_configs:
- job_name: 'federate'
scrape_interval: 15s
honor_labels: true
metrics_path: '/federate'
params:
'match[]':
- '{job="prometheus"}'
- '{__name__=~"job:.*"}'
static_configs:
- targets:
- 'source-prometheus-1:9090'
- 'source-prometheus-2:9090'
- 'source-prometheus-3:9090'
Should this be enough to get this to work? I tried a lot of variations so I
start to doubt if I am on the right track.
Thanks in advance.
Jacco.
--
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/e5331505-916b-405f-8756-c8900b6fc0b8%40googlegroups.com.