简介
Grafana是一个可视化面板(Dashboard),有着非常漂亮的图表和布局展示,功能齐全的度量仪表盘和图形编辑器,支持Graphite、zabbix、InfluxDB、Prometheus和OpenTSDB作为数据源。Grafana主要特性:灵活丰富的图形化选项;可以混合多种风格;支持白天和夜间模式;多个数据源。
安装方式
1、通过yum网络安装
yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
2、下载rpm包
wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3-1.x86_64.rpm
yum install initscripts fontconfig
rpm -Uvh grafana-5.1.3-1.x86_64.rpm
3、添加yum软件源
cat > /etc/yum.repos.d/grafana.repo <<EOF
[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
EOF
yum install grafana
grafana包内文件详情
二进制文件: /usr/sbin/grafana-server
启动文件: /etc/init.d/grafana-server
启动环境变量: /etc/sysconfig/grafana-server
配置文件: /etc/grafana/grafana.ini
systemd服务名称: grafana-server.service
默认配置的日志文件:var/log/grafana/grafana.log
sqlite3数据库文件: /var/lib/grafana/grafana.db
服务操作
刚安装完需要重载systemd配置:systemctl daemon-reload
启动服务:systemctl start grafana-server
查看状态:systemctl status grafana-server
设置开机启动: systemctl enable grafana-server.service