zabbix grafana install

zabbix grafana install

  1. grafana简要说明

    1
    2
    3
    Grafana是Graphite和InfluxDB仪表盘和图形编辑器.
    Grafana是开源的,功能齐全的度量仪表盘和图形编辑器,支持Graphite,InfluxDB和OpenTSDB
    Grafana主要特性:灵活丰富的图形化选项;可以混合多种风格;支持白天和夜间模式;多个数据源;Graphite和InfluxDB 查询编辑器等等
  2. Grafana install

    1
    2
    3
    4
    5
    6
    7
    [root@192 app]# wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm
    [root@192 app]# yum -y install initscripts fontconfig freetype* urw-fonts
    [root@192 app]# rpm -Uvh grafana-4.2.0-1.x86_64.rpm
    [root@192 app]# rpm -qc grafana
    /etc/init.d/grafana-server
    /etc/sysconfig/grafana-server
    /usr/lib/systemd/system/grafana-server.service
  3. Granfana 配置文件

    1
    2
    3
    4
    5
    6
    [root@192 app]# vim /etc/grafana/grafana.ini

    [root@192 app]# mkdir -p /mnt/data/grafana/plugins
    [root@192 app]# mkdir -p /mnt/log/grafana
    [root@192 app]# chown -R grafana.grafana /mnt/data/grafana
    [root@192 app]# chown -R grafana.grafana /mnt/log/grafana
  4. Granfana 启动

    1
    2
    3
    4
    [root@192 app]# systemctl daemon-reload
    [root@192 app]# systemctl start grafana-server
    [root@192 app]# systemctl status grafana-server
    [root@192 app]# systemctl enable grafana-server
  5. Granfana install plugins

    1
    2
    3
    4
    [root@192 app]# grafana-cli plugins list-remote
    [root@192 app]# grafana-cli plugins install alexanderzobnin-zabbix-app
    [root@192 app]# grafana-cli plugins install grafana-clock-panel
    [root@192 app]# systemctl restart grafana-server
  6. Granfana控制台

    1
    2
    3
    open: http://{grafana}:3000    admin:admin

    open: 左上角 -> plugins -> apps -> zabbix ->enable
  7. Granfana添加数据源

    1
    open: 左上角 -> data sources -> add data source -> zabbix ->enable