Monitoring in Kubernetes (Multi-Cluster environment)

This is the last article in three-part series on monitoring. If you haven't read the what, how and why of monitoring, and monitoring in kubernetes (Hands-On). I would suggest giving them a read first.

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
# Create monitoring namespace
kubectl create ns monitoring
# Install grafana
helm install stable/grafana --name grafana --namespace monitoring -f grafana.yaml
## Import the kubernetes cost and microservice health dashboards as described in hands-on
# Install Prometheus
helm install stable/prometheus --name my-first-cluster-prometheus --namespace monitoring -f prometheus-central.yaml

--

--

Bikes, Tea, Sunsets in that order. Software Engineer who fell in love with cloud-native infrastructure.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
ADIL RAFIQ

Bikes, Tea, Sunsets in that order. Software Engineer who fell in love with cloud-native infrastructure.