监控仪表盘#

SkyForm AIP使用Prometheus和Grafana作为监控系统。安装步骤如下:

安装Prometheus#

从https://prometheus.io/download/下载最新版的Prometheus包,如prometheus-3.3.1.linux-amd64.tar.gz。

解压后把可执行文件prometheus放到/usr/lib/prometheus目录下。

tar xfz prometheus-3.3.1.linux-amd64.tar.gz
mkdir -p /usr/lib/prometheus
cp prometheus-3.3.1.linux-amd64/prometheus /usr/lib/prometheus

安装Grafana#

从https://grafana.com/grafana/download下载最新版的Grafana RPM包,如grafana-enterprise-10.3.3-1.x86_64.rpm

安装RPM并允许服务自动启动。

yum localinstall -y grafana-enterprise-10.3.3-1.x86_64.rpm
systemctl enable grafana-server

安装AIP监控包#

在AIP解压后的子目录prometheus-aip-exporter下运行install脚本。

cd prometheus-aip-exporter
./install

这个安装脚本会:

  1. 在/etc/grafana/provisioning/dashboards中设置仪表盘,这些仪表盘不能在Grafana中直接修改。

  2. 安装并启动aip-exporter服务,该服务在10610端口上为Prometheus提供数据,数据通过调用AIP命令获得。

  3. 配置(/usr/lib/prometheus/prometheus.yml)并启动prometheus服务。

  4. 配置(/etc/grafana/grafana.ini)并启动grafana服务。

缺省grafana的管理员为admin,密码为admin

浏览器连接#

浏览器连接到http://安装机器的IP_地址:3000,连接Grafana的仪表盘dashboard。

../_images/aip-exporter-grafana.png ../_images/aip-exporter-dashboard.png

修改已有的仪表盘#

如果在Grafana中修改了产品带的仪表盘图,只能下载成JSON文件,然后替换/etc/grafana/provisioning/dashboards中的 JSON文件,重启grafana-server服务后修改的图可以生效。

aip-exporter提供的数据#

以下命令可以获得aip-exporter的指标数据:

curl localhost:16010/metrics

请参考: aip-exporter