Implement Grafana with Prometheus in Docker
Pull all the packages docker pull prom/prometheus:latest docker pull prom/node-exporter:latest docker pull grafana/grafana:latest docker pull influxdb:latest Configure Prometheus mkdir -p /etc/prometheus vi prometheus.yml # Paste below Lines in prometheus.yml # scrape configuration scraping a Node Exporter and the Prometheus # # # #server itself scrape_configs: # Scrape Prometheus itself every 5 seconds. - job_name: ‘prometheus’ scrape_interval: 5s static_configs: - targets: [‘10.x.x.x:9090’] Run promrtheus docker run -d -p 9090:9090 --name prometheus -v /etc/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus:latest --config.file=/etc/prometheus/prometheus.yml Run Grafana docker run -d -p 3000:3000 --name grafana -e “GF_SECURITY_ADMIN_PASSWORD=admin_password” -v ~/grafana_db:/var/lib/grafana grafana/grafana:latest Run influxdb (optional): If want to store data docker run -d --name=influxdb --restart on-failure -p 8086:8086 -v influxdb_data:/var/lib/i...