Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install prometheus in docker

Shulou Source: shulou.com Published: 2022-06-01 02:11:14 09月22日 Update

This article mainly shows you "how to install prometheus in docker", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "how to install prometheus in docker" this article.

Mirror image

Docker pull prom/prometheus

Docker pull prom/node-exporter

Official website: https://hub.docker.com/u/prom

Launch node-exporterdocker run-d-p 9100sys:/host/sys:ro 9100\-v "/ proc:/host/proc:ro"\-v "/ sys:/host/sys:ro"\-v "/: / rootfs:ro"\-- net= "host"\ prom/node-exporter

Query node http://192.168.91.132:9100/metrics

Start prometheusmkdir / opt/prometheuscd / opt/prometheus/vim prometheus.ymldocker run-d\-p 9090 opt/prometheus/vim prometheus.ymldocker run 9090\-v / opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml\ prom/prometheus

Configuration file

Global: scrape_interval: 60s evaluation_interval: 60s scrape_configs:-job_name: prometheus static_configs:-targets: ['localhost:9090'] labels: instance: prometheus-job_name: linux static_configs:-targets: [' 192.168.91.132evaluation_interval 9100'] labels: instance: localhost are all the contents of the article "how to install prometheus in docker" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Content articles learning help documents easy to understand more organization knowledge editing industry information information channels mirrors channels queries research configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL vpn Linux OPPO Reno Docker