prometheus安装全过程
#安装prometheus

wget https://github.com/prometheus/prometheus/releases/download/v2.5.0/prometheus-2.5.0.linux-amd64.tar.gz tar -xvf prometheus-2.5.0.linux-amd64.tar.gz cd prometheus-2.5.0.linux-amd64/ mv * /home/work/prometheus/ cd /home/work/prometheus/ mkdir {data,cfg,logs,bin} -p mv prometheus promtool bin/ mv prometheus.yml cfg/ vim /etc/systemd/system/prometheus.service [Unit] Description=Prometheus Documentation=https://prometheus.io/ After=network.target [Service] Type=simple User=root ExecStart=/home/work/prometheus/bin/prometheus --config.file=/home/work/prometheus/cfg/prometheus.yml --storage.tsdb.path=/home/work/prometheus/data Restart=on-failure [Install] WantedBy=multi-user.target vim /home/work/prometheus/cfg/prometheus.yml
#安装node_exporter

wget https://github.com/prometheus/node_exporter/releases/download/v0.18.1/node_exporter-0.18.1.darwin-amd64.tar.gz tar -zxvf node_exporter-0.17.0-rc.0.linux-amd64.tar.gz -C cd /home/work/prometheus/ cd /home/work/prometheus/ mv node_exporter-0.17.0-rc.0.linux-amd64 node_exporter vim /etc/systemd/system/node_exporter.service [Unit] Description=node_exporter Documentation=https://prometheus.io/ After=network.target [Service] Type=simple User=root ExecStart=/home/work/prometheus/node_exporter/node_exporter Restart=on-failure [Install] WantedBy=multi-user.target
#安装grafana

wget https://dl.grafana.com/oss/release/grafana-6.1.3-1.x86_64.rpm yum -y localinstall grafana-6.1.3-1.x86_64.rpm
#安装alertmanager

wget https://github.com/prometheus/alertmanager/releases/download/v0.20.0/alertmanager-0.20.0.linux-amd64.tar.gz tar -xvf alertmanager-0.20.0.linux-amd64.tar.gz -C /home/work/prometheus/ cd /home/work/prometheus/ && mv alertmanager-0.20.0.linux-amd64/ alertmanager cd alertmanager/ mkdir {bin,cfg,data} mv alertmanager amtool bin/ mv alertmanager.yml cfg/ vim /usr/lib/systemd/system/alertmanager.service [Unit] Description=alertmanager Documentation=https://prometheus.io/ After=network.target [Service] Type=simple User=root ExecStart=/home/work/prometheus/alertmanager/bin/alertmanager \ --config.file=/home/work/prometheus/alertmanager/cfg/alertmanager.yml \ --web.listen-address=10.10.2.17:9093 \ --cluster.listen-address=0.0.0.0:8001 \ --storage.path=/home/work/prometheus/alertmanager/data \ --log.level=info Restart=on-failure LimitNOFILE=65536 [Install] WantedBy=multi-user.target
#安装pushgateway

wget https://github.com/prometheus/pushgateway/releases/download/v1.0.1/pushgateway-1.0.1.linux-amd64.tar.gz tar xzvf pushgateway-1.0.1.linux-amd64.tar.gz mv pushgateway-1.0.1.linux-amd64 /home/work/prometheus/pushgateway ./pushgateway &
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
· AI与.NET技术实操系列(二):开始使用ML.NET
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)