grafana使用教程
安装
参考 https://grafana.com/docs/grafana/latest/installation/rpm/
1
| $ sudo vim /etc/yum.repos.d/grafana.repo
|
对于开源而言,内容如下:
1 2 3 4 5 6 7 8 9
| [grafana] name=grafana baseurl=https://packages.grafana.com/oss/rpm repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://packages.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
对于商用版本,内容如下:
1 2 3 4 5 6 7 8 9
| [grafana] name=grafana baseurl=https://packages.grafana.com/enterprise/rpm repo_gpgcheck=1 enabled=1 gpgcheck=1 gpgkey=https://packages.grafana.com/gpg.key sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt
|
然后开始安装
1 2 3 4 5 6
| $ sudo yum update $ sudo yum install grafana
$ sudo yum install grafana-enterprise
|
安装插件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| 使用grafana-cli工具安装
$ grafana-cli plugins list-remote
$ grafana-cli plugins install grafana-piechart-panel
$ grafana-cli plugins install grafana-clock-panel
$ grafana-cli plugins install briangann-gauge-panel
$ grafana-cli plugins install natel-discrete-panel
$ grafana-cli plugins install vonage-status-panel
|
启动、重启、关闭
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| $ service grafana-server start
$service grafana-server stop
$ service grafana-server restart
$chkconfig --add grafana-server on
$ sudo systemctl daemon-reload $ sudo systemctl start grafana-server $ sudo systemctl status grafana-server
$ sudo systemctl enable grafana-server
|
创建Dashboard
首先选定一个数据库,添加一个数据源。
登录Grafana Protal
在浏览器中输入:http://GRAFANA_HOST_IP:3000
默认账号/密码:admin/admin
进入Plugins界面,选择“Zabbix”
开始面板(左上角图标) -> Plugins -> Apps -> Zabbix