InfluxDB 是一个开源分布式时序、事件和指标数据库。使用 Go 语言编写,无需外部依赖。其设计目标是实现分布式和水平伸缩扩展。

它有三大特性:

1. Time Series (时间序列):你可以使用与时间有关的相关函数(如最大,最小,求和等)
2. Metrics(度量):你可以实时对大量数据进行计算
3. Eevents(事件):它支持任意的事件数据

特点

  • schemaless(无结构),可以是任意数量的列
  • Scalable
  • min, max, sum, count, mean, median 一系列函数,方便统计
  • Native HTTP API, 内置http支持,使用http读写
  • Powerful Query Language 类似sql
  • Built-in Explorer 自带管理工具

一、安装

wget https://dl.influxdata.com/influxdb/releases/influxdb-1.1.1.x86_64.rpm
sudo yum localinstall influxdb-1.1.1.x86_64.rpm

二、简单操作

一、CRUD
[root@OEL6-38 influxdb]# ls
influx influxd init.sh versions
[root@OEL6-38 influxdb]# /opt/influxdb/influx
Connected to http://localhost:8086 version 0.9.3
InfluxDB shell 0.9.3
> help
Usage:
connect <host:port> connect to another node
auth prompt for username and password
pretty toggle pretty print
use <db_name> set current databases
format <format> set the output format: json, csv, or column
settings output the current settings for the shell
exit quit the influx shell show databases show database names
show series show series information
show measurements show measurement information
show tag keys show tag key information
show tag values show tag value information a full list of influxql commands can be found at:
https://influxdb.com/docs/v0.9/query_language/spec.html

> show databases;
name: databases
---------------
name
db
yy
testDB

> use yy
Using database yy

> INSERT cpu_load_short,host=server01,region=us-west value=0.64,value2=0.86 1434055562000000000
> INSERT cpu_load_short,host=server02,region=us-west value=0.64,value2=0.86 1434055562000000000
> INSERT cpu_load_short,host=server02,region=us-west value3=0.84,value4=0.96 1434055562000008888

> SHOW MEASUREMENTS      #显示所有表

name: measurements
------------------
name
cpu_load_short

> SHOW FIELD KEYS
name: cpu_load_short
--------------------
fieldKey
value
value2
value3
value4

> SHOW series from cpu_load_short
name: cpu_load_short
--------------------
_key host region
cpu_load_short,host=server01,region=us-west server01 us-west
cpu_load_short,host=server02,region=us-west server02 us-west

> SHOW TAG KEYS FROM cpu_load_short
name: cpu_load_short
--------------------
tagKey
host
region

> SHOW TAG VALUES FROM cpu_load_short with key = "host"
name: hostTagValues
-------------------
host
server01
server02

> SHOW TAG VALUES FROM cpu_load_short WITH KEY IN ("region", "host")
name: hostTagValues
-------------------
host
server01
server02

name: regionTagValues
---------------------
region
us-west

二、查询数据

> SELECT * FROM /.*/ LIMIT 1
name: cpu_load_short
--------------------
time host region value value2 value3 value4
2015-06-11T20:46:02Z server01 us-west 0.64 0.86

参考链接:

https://www.influxdata.com/downloads/

http://www.cnblogs.com/liujianzuo888/articles/6017943.html

InfluxDB系列之一安装及简单运维(未完成,需要继续写)的更多相关文章

  1. shell 脚本实战笔记(11)--Mysql在linux下的安装和简单运维

    前言: linux中安装mysql以及配置的管理, 基础的运维和管理还是需要会一些的. 这边作下笔记, 以求天天向上(^_^). 安装流程:*). 安装mysql-server1). 借助yum检索相 ...

  2. 老司机实战Windows Server Docker:3 单节点Windows Docker服务器简单运维(上)

    经过上两篇实战Windows Server Docker系列文章,大家对安装Windows Docker服务以及如何打包现有IIS应用为docker镜像已经有了基本认识.接下来我们来简单讲讲一些最基本 ...

  3. 老司机实战Windows Server Docker:4 单节点Windows Docker服务器简单运维(下)

    上篇中,我们主要介绍了使用docker-compose对Windows Docker单服务器进行远程管理,编译和部署镜像,并且设置容器的自动启动.但是,还有一些重要的问题没有解决,这些问题不解决,就完 ...

  4. PHP程序员的简单运维

    所谓的简单运维就是保证自己开发的程序能正常运行和使用. 当一个程序员需要兼作运维时候需要掌握以下技能 1.linux系统基础命令和Windows Server操作 是基础中的基础,ls, rm, to ...

  5. Rocket Mq 常用API 及简单运维

    RocketMQ 常用API 消息 消息消费模式 消息消费模式由消费者来决定,可以由消费者设置MessageModel来决定消息模式. 消息模式默认为集群消费模式 consumer.setMessag ...

  6. Cobbler自动化批量安装Linux操作系统 - 运维总结

    一.Cobbler简述 Cobbler是一个自动化和简化系统安装的工具,通过使用网络引导来控制和启动安装.Cobbler的特性包括存储库镜像.Kickstart模板和连接电源管理系统.Cobbler通 ...

  7. linux中ftp的安装过程记录[运维篇]

    安装FTP的全过程记录,对于相同情况希望有所帮助.[centOS] 1.查询本机是否安装vsftpd: rpm -qa |grep vsftpd : 2.安装ftp服务 yum install vsf ...

  8. Centos7安装配置ansible运维自动化工具

    准备至少两台机器 Centos7,这两台机器都关闭 selinux IP:106.13.118.132 服务端(ansible) masterIP:148.70.60.244 节点 slaver 服务 ...

  9. 简单聊一聊Ansible自动化运维

    一.Ansible概述 Ansible是今年来越来越火的一款开源运维自动化工具,通过Ansible可以实现运维自动化,提高运维工程师的工作效率,减少人为失误.Ansible通过本身集成的非常丰富的模块 ...

随机推荐

  1. 【刷题】洛谷 P3573 [POI2014]RAJ-Rally

    题目描述 An annual bicycle rally will soon begin in Byteburg. The bikers of Byteburg are natural long di ...

  2. 【BZOJ4999】This Problem Is Too Simple!(线段树)

    [BZOJ4999]This Problem Is Too Simple!(线段树) 题面 BZOJ 题解 对于每个值,维护一棵线段树就好啦 动态开点,否则空间开不下 剩下的就是很简单的问题啦 当然了 ...

  3. 【bzoj2034】 2009国家集训队—最大收益

    http://www.lydsy.com/JudgeOnline/problem.php?id=2034 (题目链接) 题意 n个任务,每个任务只需要一个时刻就可以完成,完成后获得${W_i}$的收益 ...

  4. 遇到问题----mongodb-----mongorestore报错too many open files甚至mongo服务崩溃

    之前运行mongorestore还原mongodb数据库一直都没问题,今天还原的时候 报错too many open files.而且mongo服务经常崩溃需要重启. 问题有两方面: 原因一 一个原因 ...

  5. scala 的安装 与 IDEA安装使用

    一.安装 scala 1.下载scala-2.11.8.msi 安装包,   首先去官网http://www.scala-lang.org/,然后点击导航栏的DOWNLOAD,进入下载链接:http: ...

  6. C++ explicit constructor/copy constructor note

    C++:explict 作用显示声明构造函数只能被显示调用从而阻止编译器的隐式转换,类似只能用()显示调用,而不能=或者隐式调用 #include <iostream> #include ...

  7. mysql 优化之查询缓存(mysql8已经废弃这个功能)

    对于缓存,一般人想到的是 redis.memcache 这些内存型的缓存. 但是实际上 mysql 也提供了缓存,mysql 里面的缓存是查询缓存,可以把我们查询过的语句缓存下来,下一次查询的时候有可 ...

  8. (二)C语言文本流和二进制流的区别

    转至:http://www.cnblogs.com/xiangzi888/archive/2011/11/10/2244336.html 一.首先回答,什么是文件,流 一个文件通常就是磁盘上的一段命名 ...

  9. springboot 日期转化报错

    问题场景: 使用Springboot框架搭建服务,传日期参数json参数为2016-08-15 17:00:00这种格式,springboot中不能识别,将其转化为对象对应的日期属性.而是抛出异常信息 ...

  10. openstack开发环境与代码测试

    一.openstack单组件开发环境 1.Python虚拟环境搭建 主要参考文献: https://virtualenv.pypa.io/en/latest/virtualenv.html 说明:Py ...