Monitor Jenkins with G.A.P on K8s cluster
The goal of this page is to show you how to monitor Jenkins which is running on a K8s cluster.
G.A.P stands for Grafana, AlertManager, Prometheus
Pre-requisite
Before everything, you have to have the Jenkins running on a K8s cluster. Please see the step by step guide to deploy and configure Jenkins on K8s.
Install the "Prometheus" plugin on Jenkins. The Plugin will expose the Prometheus endpoint
Install Prometheus
Create a prometheus configuration YAML file which is basically telling prometheus what jobs to run and how to run
job_name: 'prometheus': Tells prometheus to scrape itself
job_name: 'jenkins-lb': Configures prometheus to scrape Jenkins metrics
job_name: 'node-exporter': Configures prometheus to scrape the node-exporter-service. The service is deployed separately
job_name: 'kube-state-metrics': Configures prometheus to scrape data from kube-state-metrics
job_name: 'scheduler-service': Configure prometheus to monitor the kube-scheduler. Some K8s service provider(PKS) might hide the kube-scheduler, so you won't see it from kubectl.
Reference: https://sysdig.com/blog/kubernetes-monitoring-prometheus/
Last updated