• zabbix3.0.4安装grapha实现多台主机相同监控项集中展示


    zabbix3.0.4安装grapha图形展示系统


    操作系统
    # cat /etc/redhat-release 
    CentOS Linux release 7.2.1511 (Core) 

    1.安装grafana-2.6.0-1的rpm包
    yum install fontconfig -y
    # rpm -ivh grafana-2.6.0-1.x86_64.rpm

    启动grafana服务
    systemctl start grafana-server

    查看是否能够正常访问
    http://192.168.3.13:3000

    2.下载zabbix的grafana插件,以及配置相关文件
    测试通过git clone方式安装不上(可能是方法不对)
    # wget https://codeload.github.com/alexanderzobnin/grafana-zabbix/tar.gz/v2.5.1
    # tar fxz grafana-zabbix-2.5.1.tar.gz 
    # cd grafana-zabbix-2.5.1
    # ls
    LICENSE.md  README.md  zabbix
    # cp -rf zabbix/ /usr/share/grafana/public/app/plugins/datasource/

    3.测试一下zabbix的api接口是否正常连通

    grafana需要和zabbix_api接口进行交互并且获取数据展示

    curl -i -X POST -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","method":"user.login","params":{"user":"Admin","password":"zabbix"},"auth":null,"id":0}' http://192.168.3.13/zabbix/api_jsonrpc.php

    HTTP/1.1 200 OK
    Date: Wed, 15 Feb 2017 13:33:26 GMT
    Server: Apache/2.4.6 (CentOS) PHP/5.4.16
    X-Powered-By: PHP/5.4.16
    Access-Control-Allow-Origin: *
    Access-Control-Allow-Headers: Content-Type
    Access-Control-Allow-Methods: POST
    Access-Control-Max-Age: 1000
    Content-Length: 68
    Content-Type: application/json

    # 返回result类似800b578c7409de36aba0cd69704985dafa这种sessionid表述访问是ok的
    {"jsonrpc":"2.0","result":"800b578c7409de36aba0cd69704985dafa","id":0}

    4.登录配置grafana

    http://ip:3000 默认用户和密码均为admin

    ①修改admin默认账户密码
    左侧菜单栏:Grafana admin --> Global Users --> Edit


    ②添加连接zabbix的数据库,账号密码为登陆zabbix web端的账号密码

    http://ip:3000/datasources/edit/2




    ③添加展示,如对某个网卡流量的展示

    home --> new --> 新建一个dashboard


    点击绿色的漂浮框添加graph图像展示


    对dashboard进行改名操作


    编辑具体的监控项目



    保存展示


    效果展示


  • 相关阅读:
    如何将CentOS的默认启动界面修改为图形界面or字符界面
    如何将CentOS的默认启动界面修改为图形界面or字符界面
    virtualbox下CentOS7安装增强功能
    蓝牙4.0
    HC-SR04超声波测距
    STM32F407 通用同步异步收发器(串口)
    STM32F4 TIM(外设定时器)
    STM32F4 系统定时器
    STM32F4 异常与中断
    LED和按键实验
  • 原文地址:https://www.cnblogs.com/reblue520/p/6784501.html
Copyright © 2020-2023  润新知