Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install prometheus in docker

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

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!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report