InfluxDB系列之一安装及简单运维(未完成,需要继续写)
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系列之一安装及简单运维(未完成,需要继续写)的更多相关文章
- shell 脚本实战笔记(11)--Mysql在linux下的安装和简单运维
前言: linux中安装mysql以及配置的管理, 基础的运维和管理还是需要会一些的. 这边作下笔记, 以求天天向上(^_^). 安装流程:*). 安装mysql-server1). 借助yum检索相 ...
- 老司机实战Windows Server Docker:3 单节点Windows Docker服务器简单运维(上)
经过上两篇实战Windows Server Docker系列文章,大家对安装Windows Docker服务以及如何打包现有IIS应用为docker镜像已经有了基本认识.接下来我们来简单讲讲一些最基本 ...
- 老司机实战Windows Server Docker:4 单节点Windows Docker服务器简单运维(下)
上篇中,我们主要介绍了使用docker-compose对Windows Docker单服务器进行远程管理,编译和部署镜像,并且设置容器的自动启动.但是,还有一些重要的问题没有解决,这些问题不解决,就完 ...
- PHP程序员的简单运维
所谓的简单运维就是保证自己开发的程序能正常运行和使用. 当一个程序员需要兼作运维时候需要掌握以下技能 1.linux系统基础命令和Windows Server操作 是基础中的基础,ls, rm, to ...
- Rocket Mq 常用API 及简单运维
RocketMQ 常用API 消息 消息消费模式 消息消费模式由消费者来决定,可以由消费者设置MessageModel来决定消息模式. 消息模式默认为集群消费模式 consumer.setMessag ...
- Cobbler自动化批量安装Linux操作系统 - 运维总结
一.Cobbler简述 Cobbler是一个自动化和简化系统安装的工具,通过使用网络引导来控制和启动安装.Cobbler的特性包括存储库镜像.Kickstart模板和连接电源管理系统.Cobbler通 ...
- linux中ftp的安装过程记录[运维篇]
安装FTP的全过程记录,对于相同情况希望有所帮助.[centOS] 1.查询本机是否安装vsftpd: rpm -qa |grep vsftpd : 2.安装ftp服务 yum install vsf ...
- Centos7安装配置ansible运维自动化工具
准备至少两台机器 Centos7,这两台机器都关闭 selinux IP:106.13.118.132 服务端(ansible) masterIP:148.70.60.244 节点 slaver 服务 ...
- 简单聊一聊Ansible自动化运维
一.Ansible概述 Ansible是今年来越来越火的一款开源运维自动化工具,通过Ansible可以实现运维自动化,提高运维工程师的工作效率,减少人为失误.Ansible通过本身集成的非常丰富的模块 ...
随机推荐
- http请求头、响应头文件详解
HTTP Request Header 请求头 解释 示例 Accept 指定客户端能够接收的内容类型 Accept: text/plain, text/html Accept-Charset 浏 ...
- DPHARD
此篇收集各类DP题. <1D1D动态规划优化初步>的3个模型 1. f[x] = min(f[i]+w[i, x]), i < x且w[i, x]满足单调性(即w[i, j]+w[i ...
- linux内核分析 第六周读书笔记
第三章 进程管理 3.1 进程 进程:处于执行期的程序 线程是在进程活动中的对象:内核调度的对象是线程而不是进程,在Linux系统中,并不区分线程和进程 在现代操作系统中, 进程提供两种虚拟机制:虚拟 ...
- 单点登录(八)-----遇到问题-----Application Not Authorized to Use CAS
配置好cas后访问cas client 并没有跳转到登录页面,而是页面报错误提示: Application Not Authorized to Use CAS. The application yo ...
- navicat链接mysql
navicat链接mysql
- python中的模块及路径(2)
如果我们要添加自己的搜索目录,有两种方法: 一是直接修改sys.path,添加要搜索的目录: >>> import sys >>> sys.path.append( ...
- CF&&CC百套计划2 CodeChef December Challenge 2017 Penalty Shoot-out
https://www.codechef.com/DEC17/problems/CPLAY #include<cstdio> #include<algorithm> using ...
- 数学建模 TSP(旅行商问题) Lingo求解
model: sets: cities../:level; link(cities, cities): distance, x; !距离矩阵; endsets data: distance ; end ...
- ASP.NET项目与IE10、IE11不兼容的解决办法
1.解决办法 机器级别修复, 服务器所有ASP.NET程序受益 需要去微软下载对应asp.NET版本的修补程序 .NET 4 -http://support.microsoft.com/kb/2600 ...
- 微服务深入浅出(4)-- 负载均衡Ribbon
Spring Cloud中可以使用RestTemplate+Ribbon的解决方案来将负载均衡以代码的形式封装到客户端中. 通过查阅官方文档可以知道,只需要在程序的IoC容器中注入一个restTemp ...