InfluxDB是一个当下比较流行的时序数据库,InfluxDB使用 Go 语言编写,无需外部依赖,安装配置非常方便,适合构建大型分布式系统的监控系统。

一、InfluxDB 简介

InfluxDB 是用Go语言编写的一个开源分布式时序、事件和指标数据库,无需外部依赖。

类似的数据库有Elasticsearch、Graphite等。

1、与传统数据库中的名词做比较

influxDB中的名词 传统数据库中的概念
database 数据库
measurement 数据库中的表
points 表里面的一行数据

2、InfluxDB中独有的概念

1)Point

Point由时间戳(time)、数据(field)、标签(tags)组成。

Point相当于传统数据库里的一行数据,如下表所示:

Point属性 传统数据库中的概念
time 每个数据记录时间,是数据库中的主索引(会自动生成)
fields 各种记录值(没有索引的属性)也就是记录的值:温度, 湿度
tags 各种有索引的属性:地区,海拔
2)series

所有在数据库中的数据,都需要通过图表来展示,而这个series表示这个表里面的数据,可以在图表上画成几条线:通过tags排列组合算出来。

如下所示:

>show series from cpu
key
cpu,cpu=cpu-total,host=ResourcePool--billing07
cpu,cpu=cpu-total,host=billing07
cpu,cpu=cpu0,host=ResourcePool--billing07
cpu,cpu=cpu0,host=billing07
cpu,cpu=cpu1,host=ResourcePool--billing07
cpu,cpu=cpu1,host=billing07
cpu,cpu=cpu10,host=ResourcePool--billing07
cpu,cpu=cpu10,host=billing07
cpu,cpu=cpu11,host=ResourcePool--billing07
cpu,cpu=cpu11,host=billing07
cpu,cpu=cpu12,host=ResourcePool--billing07
cpu,cpu=cpu12,host=billing07
cpu,cpu=cpu13,host=ResourcePool--billing07
cpu,cpu=cpu13,host=billing07
cpu,cpu=cpu14,host=ResourcePool--billing07
cpu,cpu=cpu14,host=billing07
cpu,cpu=cpu15,host=ResourcePool--billing07
cpu,cpu=cpu15,host=billing07
cpu,cpu=cpu16,host=ResourcePool--billing07
cpu,cpu=cpu17,host=ResourcePool--billing07
cpu,cpu=cpu18,host=ResourcePool--billing07
cpu,cpu=cpu19,host=ResourcePool--billing07
cpu,cpu=cpu2,host=ResourcePool--billing07
cpu,cpu=cpu2,host=billing07
cpu,cpu=cpu20,host=ResourcePool--billing07
cpu,cpu=cpu21,host=ResourcePool--billing07
cpu,cpu=cpu22,host=ResourcePool--billing07
cpu,cpu=cpu23,host=ResourcePool--billing07
cpu,cpu=cpu3,host=ResourcePool--billing07
cpu,cpu=cpu3,host=billing07
cpu,cpu=cpu4,host=ResourcePool--billing07
cpu,cpu=cpu4,host=billing07
cpu,cpu=cpu5,host=ResourcePool--billing07
cpu,cpu=cpu5,host=billing07
cpu,cpu=cpu6,host=ResourcePool--billing07
cpu,cpu=cpu6,host=billing07
cpu,cpu=cpu7,host=ResourcePool--billing07
cpu,cpu=cpu7,host=billing07
cpu,cpu=cpu8,host=ResourcePool--billing07
cpu,cpu=cpu8,host=billing07
cpu,cpu=cpu9,host=ResourcePool--billing07
cpu,cpu=cpu9,host=billing07

其主要特色功能

1)基于时间序列,支持与时间有关的相关函数(如最大,最小,求和等)

2)可度量性:你可以实时对大量数据进行计算

3)基于事件:它支持任意的事件数据

InfluxDB的主要特点

1)无结构(无模式):可以是任意数量的列

2)可拓展的

3)支持min, max, sum, count, mean, median 等一系列函数,方便统计

4)原生的HTTP支持,内置HTTP API

5)强大的类SQL语法

6)自带管理界面,方便使用

自带管理界面:

二、InfluxDB安装

RedHat & CentOS (64-bit)

wget https://dl.influxdata.com/influxdb/releases/influxdb-0.13.0.x86_64.rpm
sudo yum localinstall influxdb-0.13..x86_64.rpm
MD5: 286b6c18aa4ef37225ea6605a729b61d

三、InfluxDB启动

1)服务端启动

如果是通过包安装的,可以使用如下语句启动:

sudo service influxdb start

如果直接下载的二进制包,则通过如下方式启动

进入InfluxDB目录下的usr/bin文件夹,执行:

./influxd

即可。

这样就启动了服务端。

2)客户端

在usr/bin里使用influx即可登入Influx服务器。也可以将路径加入环境变量中,这样既可在任意地方使用influx。

InfluxDB自带web管理界面,在浏览器中输入 http://服务器IP:8083 即可进入web管理页面。

InfluxDB安装和简介的更多相关文章

  1. InfluxDB学习之InfluxDB的安装和简介

    最近用到了 InfluxDB,在此记录下学习过程,同时也希望能够帮助到其他学习的同学. 本文主要介绍InfluxDB的功能特点以及influxDB的安装过程.更多InfluxDB详细教程请看:Infl ...

  2. InfluxDB 安装以及使用

    InfluxDB InfluxDB简介: InfluxDB 是一个开源分布式时序.事件和指标数据库.使用Go语言编写,无需外部依赖.其设计目标是实现分布式和水平伸缩扩展.        它有三大特性: ...

  3. InfluxDB安装后web页面无法访问的解决方案

    本文属于<InfluxDB系列教程>文章系列,该系列共包括以下 16 部分: InfluxDB学习之InfluxDB的安装和简介 InfluxDB学习之InfluxDB的基本概念 Infl ...

  4. InfluxDB安装及配置

    这是我之前整理的InfluxDB安装及配置的笔记,这里记录下,也方便我以后查阅. 环境: CentOS6.5_x64 InfluxDB版本:1.1.0 一.安装 1.二进制安装 这里以centos6. ...

  5. 时序数据库InfluxDB安装及使用

    时序数据库InfluxDB安装及使用 1 安装配置 安装 wget https://dl.influxdata.com/influxdb/releases/influxdb-1.3.1.x86_64. ...

  6. [InfluxDB] 安装与配置

    [InfluxDB] 安装与配置 1- 下载 ubtuntu: wget https://dl.influxdata.com/influxdb/releases/influxdb_1.5.2_amd6 ...

  7. 第二百九十一节,RabbitMQ多设备消息队列-安装与简介

    RabbitMQ多设备消息队列-安装与简介 RabbitMQ简介 解释RabbitMQ,就不得不提到AMQP(Advanced Message Queuing Protocol)协议. AMQP协议是 ...

  8. (转)阿里 RocketMQ 安装与简介

    原文:阿里 RocketMQ 安装与简介 一.简介 官方简介: l  RocketMQ是一款分布式.队列模型的消息中间件,具有以下特点: l  能够保证严格的消息顺序 l  提供丰富的消息拉取模式 l ...

  9. [转帖]influxdb和boltDB简介——MVCC+B+树,Go写成,Bolt类似于LMDB,这个被认为是在现代kye/value存储中最好的,influxdb后端存储有LevelDB换成了BoltDB

    influxdb和boltDB简介——MVCC+B+树,Go写成,Bolt类似于LMDB,这个被认为是在现代kye/value存储中最好的,influxdb后端存储有LevelDB换成了BoltDB ...

随机推荐

  1. 数据结构—头插法逆转单链表——空间复杂度为O(1)

    #if 1 #include<stdio.h> #include<stdlib.h> #include<iostream> using namespace std; ...

  2. Springboot中的事件Event

    事件Event作为一种常用的线程通讯工具,在Springboot中可以方便地提供开发者进行线程交互. 1.事件定义 1 import org.springframework.context.Appli ...

  3. Could not find method google() for arguments [] on repository container,rn 集成react-native-camera 出现此错误的解决方法

    (1) app/build.gradle android { compileSdkVersion buildToolsVersion "25.0.2" } compile (pro ...

  4. jQuery-3.事件篇---键盘事件

    jQuery键盘事件之keydown()与keyup()事件 鼠标有mousedown,mouseup之类的事件,这是根据人的手势动作分解的2个触发行为.相对应的键盘也有这类事件,将用户行为分解成2个 ...

  5. docker-compose部署mongodb+redis遇到的问题

    Demo环境下需要用到Redis+mongodb两种DB配合使用,所以暂时直接使用docker的redids和mongodb镜像,用docker-compose进行联合部署 使用的版本如下: dock ...

  6. Dictionary用法

    https://www.cgjoy.com/thread-106639-1-1.html 1.新建字典,添加元素  dictionary<string,string>dic=newdict ...

  7. 搭建Jmeter + Grafana + InfluxDB性能测试监控环境

    背景 Jmeter原生的实时监控每半分钟收集一次数据,只能在Linux控制台查看日志输出,界面看起来不直观,图表报告只能等压测结束后才能生成.如下图为jmeter在Linux下运行的实时日志: 那么如 ...

  8. what are you 弄啥嘞!!!!!!!!!!!!!!!!泛型

    1.为什么需要泛型 泛型在Java中有很重要的地位,网上很多文章罗列各种理论,不便于理解,本篇将立足于代码介绍.总结了关于泛型的知识.希望能给你带来一些帮助. 先看下面的代码: List list = ...

  9. 文件及文件夹操作- File类、Directory 类、FileInfo 类、DirectoryInfo 类

    文件及文件夹操作: C/S:WinForm可以操作客户端文件 Client ServerB/S:Brower Server 命名空间:using system .IO; 1. File类: 创建:Fi ...

  10. 【步步为营 Entity Framework+Reporting service开发】-(2) Code Fir

    也许有人问,为什么要用EF创建爱你数据表,code first好处是什么? 使用EF创建数据库/表,只需要设计简单的C#类,再表内容变化的时候他会自动更新数据库结构,并且保留原有数据. EF很强大,支 ...