If the image is missing text make sure you have font packages installed.
yum install fontconfig
yum install freetype*
yum install urw-fonts
1.Install via YUM Repository
Add the following to a new file at /etc/yum.repos.d/grafana.repo
[root@VM_0_7_centos ~]# vim /etc/yum.repos.d/grafana.repo
[grafana]
name=grafana
baseurl=https://packagecloud.io/grafana/stable/el/7/$basearch
repo_gpgcheck=1
enabled=1
gpgcheck=1
gpgkey=https://packagecloud.io/gpg.key https://grafanarel.s3.amazonaws.com/RPM-GPG-KEY-grafana
sslverify=1
sslcacert=/etc/pki/tls/certs/ca-bundle.crt
Then install Grafana via the yum command.
[root@VM_0_7_centos ~]# yum install grafana
2.Start the server (init.d service)
You can start Grafana by running:
[root@VM_0_7_centos ~]# service grafana-server start
Starting grafana-server (via systemctl): [ OK ]
[root@VM_0_7_centos ~]# systemctl daemon-reload
[root@VM_0_7_centos ~]# systemctl start grafana-server
[root@VM_0_7_centos ~]# systemctl enable grafana-server
Created symlink from /etc/systemd/system/multi-user.target.wants/grafana-server.service to /usr/lib/systemd/system/grafana-server.service.
[root@VM_0_7_centos ~]# systemctl status grafana-server
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2018-05-08 12:43:32 CST; 57s ago
Docs: http://docs.grafana.org
Main PID: 4822 (grafana-server)
CGroup: /system.slice/grafana-server.service
└─4822 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/...
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Executin...v1"
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Executin...55"
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Created ...in"
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Starting...ins
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Plugin d...ins
May 08 12:43:32 VM_0_7_centos systemd[1]: Started Grafana instance.
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Initiali...er"
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Initiali...et=
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Initiali...ine
May 08 12:43:32 VM_0_7_centos grafana-server[4822]: t=2018-05-08T12:43:32+0800 lvl=info msg="Initiali...nup
Hint: Some lines were ellipsized, use -l to show in full.
[root@VM_0_7_centos ~]#
Environment file
The systemd service file and init.d script both use the file located at /etc/sysconfig/grafana-server for environment variables used when starting the back-end. Here you can override log directory, data directory and other variables.
Logging
By default Grafana will log to /var/log/grafana
Database
The default configuration specifies a sqlite3 database located at /var/lib/grafana/grafana.db. Please backup this database before upgrades. You can also use MySQL or Postgres as the Grafana database, as detailed on the configuration page.
Configuration
The configuration file is located at /etc/grafana/grafana.ini. Go the Configuration page for details on all those options.
access grafana website
http://111.231.108.211:3000
login grafana infomation/ admin/admin
Installing on a local Grafana:
[root@VM_0_7_centos ~]# grafana-cli plugins install alexanderzobnin-zabbix-app
installing alexanderzobnin-zabbix-app @ 3.9.1
from url: https://grafana.com/api/plugins/alexanderzobnin-zabbix-app/versions/3.9.1/download
into: /var/lib/grafana/plugins
✔ Installed alexanderzobnin-zabbix-app successfully
Restart grafana after installing plugins . <service grafana-server restart>
[root@VM_0_7_centos ~]# systemctl restart grafana-server
Add Bashboard
search zabbix
Enable zabbix plugin
Add data source
HTTP:http://localhost/zabbix/api_jsonrpc.php
Username: Admin(默认)
Password: zabbix(默认)
anonymous access
[auth.anonymous]
# enable anonymous access
enabled = true