Prometheus Manager Web是一个基于Web的管理工具,用于监控和管理Prometheus实例。它提供了一个用户友好的界面,方便用户对Prometheus进行配置、查询、报警等操作。
以下是在CentOS 7上安装Prometheus Manager Web的步骤:
- 安装Node.js
使用yum命令安装Node.js:
sudo yum install -y nodejs
- 下载和安装Prometheus Manager Web
从GitHub上下载最新版本的Prometheus Manager Web:
wget https://github.com/prometheus-community/prom-label-proxy/releases/download/v0.1.0/pmweb-0.1.0.tar.gz
tar zxvf pmweb-0.1.0.tar.gz
cd pmweb-0.1.0
- 配置文件
在pmweb目录下创建config.json文件,并将以下内容复制到文件中:
{
"prometheus": [
{
"name": "prom-1",
"url": "http://localhost:9090"
}
],
"alertmanager": [
{
"name": "am-1",
"url": "http://localhost:9093"
}
]
}
其中,”prometheus”数组包含了要监控的所有Prometheus实例。每个实例都有一个”name”和”url”属性。如果要添加更多实例,请添加另一个对象到数组中。
“alertmanager”数组包含了所有要使用的AlertManager实例。每个AlertManager也有一个”name”和”url”属性。
- 运行
运行以下命令启动Prometheus Manager Web:
node app.js
- 访问
在浏览器中输入 http://localhost:3000 ,即可访问Prometheus Manager Web。
注意事项:
- 在config.json文件中,要监控的Prometheus实例和AlertManager实例的URL必须正确。
- 如果你的Prometheus没有设置基础身份验证,请不要在PMWeb上启用身份验证。如果你确实需要启用,那么请参考 https://github.com/prometheus-community/prom-label-proxy#configuration 以获取更多信息。




