SLV Install - Prometheus
SLV Install - Prometheus

为什么选择 Prometheus?
Prometheus 是时间序列监控的事实标准,使用强大的查询语言(PromQL)和丰富的 Exporter 生态系统来收集指标。通过
slv install 安装可以为您提供一致的指标骨干,供 Grafana 仪表板和告警规则在所有环境中使用。亮点
- Prometheus:https://prometheus.io/
- 基于拉取的抓取方式使可观测性流量可预测,同时 PromQL 可以发现可操作的洞察。
- 与 Grafana 和 Alertmanager 原生集成,无需额外设置即可进行可视化和通知。
运行安装程序
将目标主机指向要运行 Prometheus 的主机,并从组件选择器中选择它。
bash
$ slv install -i 1.1.1.1,
🚀 Installing software components...
? Select Software Component to Install (Redis)
Redis
TiDB (MySQL Cluster)
Grafana
❯ Prometheus
Node Exporter
Kafka Cluster$ slv install -i 1.1.1.1,
🚀 Installing software components...
? Select Software Component to Install (Redis)
Redis
TiDB (MySQL Cluster)
Grafana
❯ Prometheus
Node Exporter
Kafka Cluster注意:请将1.1.1.1替换为您自己服务器的 IP 地址。
查看详细信息
在 Playbook 启动之前,确认清单、Playbook 路径和可选的限制。
bash
🚀 Installing software components...
? Select Software Component to Install (Redis) › Prometheus
✅ You selected: Prometheus
📋 Installation Details:
Software: Prometheus
Inventory: 1.1.1.1,
Playbook: /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-prometheus.yml
? Do you want to proceed with the installation? (y/N) ›🚀 Installing software components...
? Select Software Component to Install (Redis) › Prometheus
✅ You selected: Prometheus
📋 Installation Details:
Software: Prometheus
Inventory: 1.1.1.1,
Playbook: /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-prometheus.yml
? Do you want to proceed with the installation? (y/N) ›观察 Ansible 执行
slv 利用 Ansible 将 Prometheus 安装为 systemd 服务并放入基线配置。bash
🚀 Running ansible: ansible-playbook -i 1.1.1.1, -u solv /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-prometheus.yml
PLAY [Install and configure Prometheus] **************************************************************
TASK [Gathering Facts] *******************************************************************************🚀 Running ansible: ansible-playbook -i 1.1.1.1, -u solv /Users/fumi/.slv/template/0.9.800/ansible/cmn/software/install-prometheus.yml
PLAY [Install and configure Prometheus] **************************************************************
TASK [Gathering Facts] *******************************************************************************验证端点
完成后,CLI 会打印 Prometheus Web UI URL,以便您确认目标正在正确抓取。
bash
✅ Installation completed successfully!
🌐 Access Information:
Prometheus URL: http://1.1.1.1:3090✅ Installation completed successfully!
🌐 Access Information:
Prometheus URL: http://1.1.1.1:3090仪表板
打开
http://1.1.1.1:3090 验证 Prometheus 目标页面。将其与 Grafana 配合使用,通过 PromQL 绘制指标图表并通过 Alertmanager 设置告警规则。