grafana安装和配置(centos7上配置)

author:  headsen  chen

date:  2019-03-29  10:33:19

 

1,安装:

yum install https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.5.2-1.x86_64.rpm
systemctl daemon-reload
systemctl start grafana-server
systemctl status grafana-server

 2,.dashboards配置

# 编辑配置文件/etc/grafana/grafana.ini,修改dashboards.json段落下两个参数的值:
[dashboards.json]
enabled = true
path = /var/lib/grafana/dashboards     # 一定要去掉开头的分号(“;”)否则配置不起作用

 

 安装仪表盘(Percona提供),重新启动应用

git clone https://github.com/percona/grafana-dashboards.git
cp -r grafana-dashboards/dashboards /var/lib/grafana/
systemctl restart grafana-server

3,登录:应用页面  http://ip:3000  用户名/密码:admin/admin

       

        

4,相关的配置文件:

installs binary to /usr/sbin/grafana-server
copies init.d script to /etc/init.d/grafana-server
installs default file (environment vars) to /etc/sysconfig/grafana-server
copies configuration file to /etc/grafana/grafana.ini
installs systemd service (if systemd is available) name grafana-server.service
the default configuration uses a log file at /var/log/grafana/grafana.log
the default configuration specifies an sqlite3 database at /var/lib/grafana/grafana.db

   修改访问端口(如3000改成3001)需要修改/etc/grafana/grafana.ini文件

5,相关插件安装

Grafana插件安装

使用grafana-cli工具安装即可。如下:
#安装Panel类型,以Clock为例
$grafana-cli plugins install grafana-clock-panel

#安装apps类型,以Worldping为例
grafana-cli plugins install raintank-worldping-app

#安装Data source类型,以SimpleJson为例
grafana-cli plugins install grafana-simple-json-datasource

安装完成,提示重启grafana服务
/etc/init.d/grafana-server restart
#列出插件
grafana-cli plugins ls

#更新插件
grafana-cli plugins update <plugin-id>

移除插件
grafana-cli plugins remove <plugin-id>
--------------------- 

 

posted @ 2019-03-29 19:02  开始认识  阅读(1681)  评论(0编辑  收藏  举报