Created
October 25, 2020 02:05
-
-
Save adrafiq/231c0d079ee1ece7f2b5df9f224906f2 to your computer and use it in GitHub Desktop.
Monitoring Example Multi-Cluster Enviornment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/helm/charts/tree/master/stable/prometheus | |
extraScrapeConfigs: | | |
# Prometheus Federation. Scrape metrics from prometheus cross-cluster | |
- job_name: 'my-first-cluster' | |
scrape_timeout: 30s | |
honor_labels: true | |
metrics_path: '/federate' | |
params: | |
'match[]': | |
- '{job="prometheus"}' | |
- '{job="prometheus-pushgateway"}' | |
- '{job="prometheus-blackbox-exporter"}' | |
- '{job="kubernetes-apiservers"}' | |
- '{job="kubernetes-nodes"}' | |
- '{job="kubernetes-nodes-cadvisor"}' | |
- '{job="kubernetes-pods"}' | |
- '{job="kubernetes-service-endpoints"}' | |
- '{job="kubernetes-nodes-cadvisor"}' | |
- '{job="kubernetes-pods"}' | |
- '{__name__=~"job:.*"}' | |
static_configs: | |
- targets: | |
- '<Link to prometheus in my-first-cluster>' | |
labels: | |
cluster: my-first-cluster | |
- job_name: 'my-second-cluster' | |
scrape_timeout: 30s | |
honor_labels: true | |
metrics_path: '/federate' | |
params: | |
'match[]': | |
- '{job="prometheus"}' | |
- '{job="prometheus-pushgateway"}' | |
- '{job="ambassador"}' | |
- '{job="prometheus-blackbox-exporter"}' | |
- '{job="kubernetes-apiservers"}' | |
- '{job="kubernetes-nodes"}' | |
- '{job="kubernetes-nodes-cadvisor"}' | |
- '{job="kubernetes-pods"}' | |
- '{job="kubernetes-service-endpoints"}' | |
- '{job="kubernetes-nodes-cadvisor"}' | |
- '{job="kubernetes-pods"}' | |
- '{__name__=~"job:.*"}' | |
static_configs: | |
- targets: | |
- '<Link to prometheus in my-second-cluster>' | |
labels: | |
cluster: my-second-cluster | |
# Alerting handled by Grafana | |
alertmanager: | |
enabled: false | |
## Monitors ConfigMap changes and POSTs to a URL | |
## Ref: https://github.com/jimmidyson/configmap-reload | |
## | |
configmapReload: | |
name: configmap-reload | |
image: | |
repository: jimmidyson/configmap-reload | |
tag: v0.2.2 | |
pullPolicy: IfNotPresent | |
server: | |
enabled: true | |
name: server | |
image: | |
repository: prom/prometheus | |
tag: v2.13.1 | |
pullPolicy: IfNotPresent | |
## Path to a configuration file on prometheus server container FS | |
configPath: /etc/config/prometheus.yml | |
global: | |
## How frequently to scrape targets by default | |
## | |
scrape_interval: 1m | |
## How long until a scrape request times out | |
## | |
scrape_timeout: 10s | |
## How frequently to evaluate rules | |
## | |
evaluation_interval: 1m | |
## | |
## Data Storage in persistent volume. | |
# persistentVolume: | |
# enabled: true | |
# mountPath: /data | |
# subPath: "" | |
# storageClass: "ssd" | |
# accessModes: | |
# - ReadWriteOnce | |
# size: 250Gi | |
nodeExporter: | |
enabled: false | |
pushgateway: | |
## If false, pushgateway will not be installed | |
enabled: false | |
kubeStateMetrics: | |
enabled: false | |
networkPolicy: | |
enabled: false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment