To bring up monitoring stack using docker
docker run -d --name prometheus-container -v /home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml -e TZ=UTC -p 9090:9090 ubuntu/prometheus:2.33-22.04_beta
Note:- For more info prometheus
docker run -d --name=grafana -p 3000:3000 grafana/grafana:8.5.5
Note:- For more info Grafana
docker run -d -p 8086:8086 --name influxdb2 influxdb:1.8.6-alpine
docker run -d -p 8080:8080 jenkins/jenkins:lts-jdk11
Connect to container and execute below Influx Commands
docker exec -it influxdb2 bash
influx
CREATE DATABASE "jenkins" WITH DURATION 1825d REPLICATION 1 NAME "jenkins-retention"
SHOW DATABASES
USE <database_name>
Alerts
docker run -d --name prometheus-alertmanager-container -e TZ=UTC -v /home/ubuntu/alertmanager.yml:/etc/alertmanager/alertmanager.yml -p 9093:9093 ubuntu/prometheus-alertmanager:0.23-22.04_beta
docker run -d --name prometheus-container -v /home/ubuntu/prometheus.yml:/etc/prometheus/prometheus.yml -v /home/ubuntu/prometheus_rules.yml:/etc/prometheus/prometheus_rules.yml -e TZ=UTC -p 9090:9090 ubuntu/prometheus:2.33-22.04_beta
SELECT build_number FROM "jenkins_data" WHERE ("project_name" =~ /^(?i)admin-api$/ AND "project_path" =~ /.*(?i)call-booking-admin.*$/) AND ( "build_result" = 'FAILURE' OR "build_result" = 'CompletedError' ) ORDER BY time DESC LIMIT 10
docker run -d --name=grafana -p 3000:3000 -v /home/ubuntu/grafana.ini:/etc/grafana/grafana.ini grafana/grafana:8.5.5