一、Grafana介绍

Grafana是一个可视化面板(Dashboard),有着非常漂亮的图表和布局展示,功能齐全的度量仪表盘和图形编辑器,支持Graphite、zabbix、InfluxDB、Prometheus和OpenTSDB作为数据源。Grafana主要特性:灵活丰富的图形化选项;可以混合多种风格;支持白天和夜间模式;多个数据源。

二、安装Grafana

CentOS系列使用YUM安装

 
1
2
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.2.0-1.x86_64.rpm
$ sudo yum localinstall grafana-4.2.0-1.x86_64.rpm

或者

 
1
2
$ yum install initscripts fontconfig
$ rpm -Uvh grafana-3.1.1-1470047149.x86_64.rpm

安装文件

 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# 二进制程序文件
/usr/sbin/grafana-server
 
# init.d脚本
/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

Sysv方式启动Grafana

 
1
2
$ service grafana-server start
$ chkconfig --add grafana-server

Systemd方式启动Grafana

 
1
2
3
$ systemctl daemon-reload
$ systemctl start grafana-server
$ systemctl status grafana-server

启动Granfa之后,进程名称为grafana-server。将会默认使用grafana用户和组运行Granfa进程。默认会开启HTTP的3000端口。启动服务之后直接直接在浏览器访问http://IP:3000就会出现如下界面,默认账号和用户名为admin/admin,在/etc/grafana/grafana.ini配置文件中可修改。

在/usr/share/grafana/public/app/plugins/datasource/目录下存放着Grafana默认支持的数据源,有如下数据源。

 
1
2
3
4
5
6
7
8
9
10
[root@localhost ~]# ll /usr/share/grafana/public/app/plugins/datasource/
drwxr-xr-x. 5 root root 4096 Aug 26 15:16 cloudwatch
drwxr-xr-x. 5 root root 4096 Aug 26 15:16 elasticsearch
drwxr-xr-x. 3 root root 4096 Aug 26 15:16 grafana
drwxr-xr-x. 3 root root 4096 Aug 26 15:16 grafana-live
drwxr-xr-x. 6 root root 4096 Aug 26 15:16 graphite
drwxr-xr-x. 5 root root 4096 Aug 26 15:16 influxdb
drwxr-xr-x. 2 root root 4096 Aug 26 15:16 mixed
drwxr-xr-x. 5 root root 4096 Aug 26 15:16 opentsdb
drwxr-xr-x. 6 root root 4096 Aug 26 15:16 prometheus

当Grafana安装完成后,就可以着手为Grafana添加数据源了,比如以Graphite和zabbix为数据源,或者以Elasticsearch为数据源都可以。具体如何添加数据源Grafana官网有详细说明

http://docs.grafana.org/datasources/overview/

后面我也会给出几个数据源具体添加过程作为参考。

三、Grafana插件安装

Grafana官网提供了很多类型的插件,能够帮助我们完成一些其他的任务,使用grafana-cli工具安装即可。如下:

安装Panel类型,以Clock为例

 
1
$grafana-cli plugins install grafana-clock-panel

安装apps类型,以Worldping为例

 
1
$ grafana-cli plugins install raintank-worldping-app

安装Data source类型,以SimpleJson为例

 
1
$ grafana-cli plugins install grafana-simple-json-datasource

安装完成,提示重启grafana服务

 
1
$ /etc/init.d/grafana-server restart

插件使用及仪表板模板导入,Worldping使用展示。

更多插件的使用自己摸索。

列出插件

 
1
$ grafana-cli plugins ls

更新插件

 
1
$ grafana-cli plugins update <plugin-id>

移除插件

 
1
$ grafana-cli plugins remove <plugin-id>

完结。。。

摘自 http://www.ywnds.com/?p=5903

关于grafana 的文章还有  https://yq.aliyun.com/articles/227006 《5分钟搭建网站实时分析:Grafana+日志服务实战》

Grafana安装配置介绍的更多相关文章

  1. grafana 安装配置

    Grafana安装配置 1.下载安装包 wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.1.3.l ...

  2. Prometheus(一):Prometheus+Grafana 安装配置

    一.基础环境 系统 IP 监控主机 CentOS 7 192.168.56.200 被监控主机 CentOS 7 192.168.56.201 二.Prometheus服务端安装 以下操作皆在监控主机 ...

  3. Jmeter+ InfluxDB+Grafana安装配置

    前置条件: 系统:windows jmeter:5.1 InfluxDB安装 下载InfluxDB-v1.7.9和Chronograf-v1.7.14(InfluxDB的可视化web端). 下载完成之 ...

  4. Grafana是一个可视化面板-安装配置介绍

    Grafana是一个可视化面板(Dashboard),有着非常漂亮的图表和布局展示,功能齐全的度量仪表盘和图形编辑器,支持Graphite.zabbix.InfluxDB.Prometheus和Ope ...

  5. Node.js 安装配置介绍

    Node.js 安装配置 本章节我们将向大家介绍在window和Linux上安装Node.js的方法. 本安装教程以Node.js v6.10.1 LTS(长期支持版本)版本为例. Node.js安装 ...

  6. influxDB+grafana安装配置及邮件告警发送配置

    1. InfluxDB安装 下载包并解压: $:wgethttps://dl.influxdata.com/influxdb/releases/influxdb-1.3.6_linux_amd64.t ...

  7. NodeJS学习(1)--- 安装配置介绍

    Node.js 安装配置 本章节我们将向大家介绍在window和Linux上安装Node.js的方法. 本安装教程以Node.js v6.10.1 LTS(长期支持版本)版本为例. Node.js安装 ...

  8. Nginx安装配置介绍(二)

    一:Nginx安装(Windows) 官网地址:https://nginx.org/en/download.html 解压完成后,文件目录如下: 启动Nginx: 直接双击目录下的nginx.exe, ...

  9. 转:Redis 的安装配置介绍

    redis 是一个高性能的key-value数据库. redis的出现,很大程度补偿了memcached这类keyvalue存储的不足,在部 分场合可以对关系数据库起到很好的补充作用.它提供了Pyth ...

随机推荐

  1. QLineEdit响应回车时避免Button同时响应

    pButton->setAutoDefault(false);

  2. 将tiff文件转化为jpg文件并保存

    jar包准备 jai-codec和jai-core 主要过程 private boolean parseTifFile(FileItem item) { logger.info("----- ...

  3. 【译】第19节---数据注解-NotMapped

    原文:http://www.entityframeworktutorial.net/code-first/notmapped-dataannotations-attribute-in-code-fir ...

  4. Windows has encountered a critical problem and will restart automatically in one minute. Please save your work now

    Windows has encountered a critical problem and will restart automatically in one minute. Please save ...

  5. Jedis使用

    Jedis是java调用Redis的接口. 一.Maven中的jedis依赖包 <!-- https://mvnrepository.com/artifact/redis.clients/jed ...

  6. 宠物属性控制_pet

    classIndex 职业索引 DmgAddPct 根据职业的法伤或攻强来计算宠物增加的物理伤害,增加的伤害值等于玩家法伤或攻强的百分比 SpAddPct 根据职业的法伤或攻强来计算宠物增加的法术伤害 ...

  7. springboot 启动报错 java.lang.IllegalStateException: Failed to introspect annotated methods on class org

    . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ...

  8. JAVA 面向对象中的多态

    多态是继封装.继承之后,面向对象的第三大特性. 现实事物经常会体现出多种形态,如学生,学生是人的一种,则一个具体的同学张三既是学生也是人,即出现两种形态. Java作为面向对象的语言,同样可以描述一个 ...

  9. oracle 存储过程给另一个用户的权限问题

    grant execute on (包名)存储过程名称 to 用户名; grant debug on  (包名)存储过程名称 to 用户名 grant select on  存储过程名称 to 用户名 ...

  10. [原][osg]osg文件与osgb文件的区别

    osgb是二进制文件 osg是文本文件 osgb可以通过osgconv.exe转换成osg文件 osgb可以包含纹理文件(就是贴图) osg只能连接外部纹理文件(是的,你看到的cow.osg都是用的外 ...