构建企业级监控大屏 prometheus + grafana

1 prometheus下载安装

1.1 虚机部署

https://prometheus.io/download/

wget https://github.com/prometheus/prometheus/releases/download/v2.53.0/prometheus-2.53.0.linux-amd64.tar.gz
tar -xvf prometheus-2.53.0.linux-amd64.tar.gz
cd /home/prometheus-2.53.0.linux-amd64
./prometheus 

1.2 容器部署

# 1下载
docker pull prom/prometheus
# 2创建prometheus配置文件
mkdir /opt/prometheus
cd /opt/prometheus/
vim prometheus.yml
# 3启动
docker run -d --name prometheus --restart=always -p 9090:9090 -v /opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus

1.3 prometheus.yml配置

scrape_configs:
  # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
  - job_name: "prometheus"
    static_configs:
      - targets: ["9.135.95.39:9090"]

访问地址:http://127.0.0.1:9090/targets?search=

1d044b1eff494f9f8c88e68d90779982.png

2 grafana下载安装

2.1 虚机部署

Download Grafana | Grafana Labs

wget https://dl.grafana.com/enterprise/release/grafana-enterprise-11.1.3.linux-amd64.tar.gz
tar -zxvf grafana-enterprise-11.1.0.linux-amd64.tar.gz
cd /home/grafana-11.1.0
bin/grafana-server web

2.2 容器部署

docker run -d --name=grafana -p 3000:3000 grafana/grafana-enterprise-dev:11.1.0-70874

2.3 数据源配置

http://127.0.0.1:3000

默认账号密码:admin/admin

4856c00912014a019223e9fbe4f29434.png

3 node监控

3.1 node_exporter下载

wget https://github.com/prometheus/node_exporter/releases/download/v1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值