Prometheus Manager Web 是一个基于 Web 的 Prometheus 管理工具,可以方便地管理 Prometheus 监控数据。下面是 Prometheus Manager Web 的安装步骤:
- 安装 Node.js
首先需要在服务器上安装 Node.js,可以使用以下命令进行安装:
sudo apt-get update
sudo apt-get install nodejs npm
- 下载和解压 Prometheus Manager Web
从 GitHub 上下载最新的 Prometheus Manager Web 压缩包,并解压到指定目录,如 /opt/prometheus-manager-web。
- 安装依赖
进入解压后的目录,运行以下命令安装所需的依赖项:
npm install
- 配置 Prometheus 数据源
打开 config/config.json 文件,将其中的 prometheusUrl 属性改为实际的 Prometheus 数据源地址。
- 启动服务
运行以下命令启动 Prometheus Manager Web 服务:
npm start
此时访问 http://localhost:3000 可以看到 Prometheus Manager Web 的登录页面,默认用户名为 admin,密码为 admin。
- 配置 Nginx 反向代理(可选)
如果需要通过域名访问 Prometheus Manager Web,则可以配置 Nginx 反向代理。示例配置如下:
server {
listen 80;
server_name example.com;
location / {
proxy_pass http://localhost:3000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}




