InfluxDB 1.2.0安装及新旧版本的注意事项

http://haibing.org/245?zwlqby=npztq3

挺好的文章 很好的解决了  上一个文档里面 关于 web admin 的问题

更多好文章见作者电子书集《Linux运维入门指南:生产运维需要掌握的技能》


随着大数据的爆发,系统数量也是直线上升,监控系统,收集系统运行状态成了保障业务正常运行中的重要一个环节。

针对这种产生频率快、带时间标签、测点多、信息量大的数据,时序数据库(Time Series Database,简称TSDB)应运而生。而其中InfluxDB是比较应用广泛的其中一个。

InfluxDB是用Go语言写的,专为时间序列数据持久化所开发的,由于使用Go语言,所以各平台基本都支持。类似的时间序列数据库还有OpenTSDB,Prometheus等。
转载本站文章请注明出处:黄海兵haibing.org

InfluxDB的Cluster功能收费,单机功能免费使用。

1、安装
可以直接rpm安装
到http://repos.influxdata.com下载相应的版本

1
2
#wget https://repos.influxdata.com/rhel/6Server/x86_64/stable/influxdb-1.2.0.x86_64.rpm
#rpm -ivh influxdb-1.2.0.x86_64.rpm

或者
添加yum 源安装

1
2
3
4
5
6
7
8
#cat << EOF | sudo tee /etc/yum.repos.d/influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL \$releasever
baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
EOF
1
2
3
4
5
6
7
8
# cat influxdb.repo
[influxdb]
name = InfluxDB Repository - RHEL $releasever
baseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stable
enabled = 1
gpgcheck = 1
gpgkey = https://repos.influxdata.com/influxdb.key
#yum install influxdb -y

2、配置
InfluxDB 1.1开始WEB管理默认是禁用的,所以装完并没有启用8083端口了,需要到配置文件里启用。
转载本站文章请注明出处:黄海兵haibing.org

1
2
3
vim /etc/influxdb/influxdb.conf
[admin]
enabled = true ​​​​

InfluxDB 1.3以及之后的版本已经取消在InfluxDB中启用web管理了,取而代之的是使用Chronograf。
官方说明:
In version 1.3, the web admin interface is no longer available in InfluxDB. The interface does not run on port 8083 and InfluxDB ignores the [admin] section in the configuration file if that section is present. Chronograf replaces the web admin interface with improved tooling for querying data, writing data, and database management. See Chronograf’s transition guide for more information.

3、启动 InfluxDB
# service influxdb start

启动后打开 web 管理界面 http://本机IP:8083/

InfluxDB 的 Web 管理界面端口是 8083,HTTP API 监听端口是 8086,如果需要更改这些默认设定,修改 InfluxDB 的配置文件 /etc/influxdb/influxdb.conf 后重启 InfluxDB 就可以了

4、基本用法

1
2
3
4
5
6
7
#influx
>help    #查看基本用法
>show databases
name: databases
name
----
_internal

新旧版本要注意的事项:
1、是否启用web管理
1.1版本开始是默认没有启用web管理的,所以新版装完之后,启动服务,8083端口是没有的。要么通过命令直接管理,要么通过API管理。
不过还是可以手动开起来的。

1
2
3
vim /etc/influxdb/influxdb.conf
[admin]
enabled = true ​​​​

官网说明
The built-in web administration GUI is deprecated in InfluxDB 1.1 and is disabled by default. We recommend using the HTTP API or the Command Line Interface to interact with InfluxDB.
InfluxDB 1.3以及之后的版本已经取消在InfluxDB中启用web管理了,取而代之的是使用Chronograf。
转载本站文章请注明出处:黄海兵haibing.org

2、默认管理账号
0.8及以前版本安装完后,是有一个账号为root、密码为root的管理账号。可作为一个默认管理权限的账号。
0.9版本及以后版本是没有默认账号的,都要自己创建。

3、HTTP API接口的不同
0.9开始跟以前的版本完全不一样,所以如果是从老版本升级到0.9或者更高版本,要注意了,接口文件要完全重新写过。
0.8以前是类似这样的请求:
http://localhost:8086/db/mydb/
而新版的是这样的:
http://localhost:8086/query?db=test&pretty=true
新版基本上都是用/query来执行,而旧版是没有的。
网上很多都是旧版代码,如果用来查询新版的,是得不到数据的。
转载本站文章请注明出处:黄海兵haibing.org

这是官网的一段说明,说明0.8跟0.9版本的不同
InfluxDB 0.8 has multiple endpoints for the API, often encoding concepts such as the database and shard space in the HTTP endpoint. InfluxDB 0.9 simplifies the common API interactions, using a common endpoint /query for all queries, and /write for all writes, regardless of database or retention policy. The database and retention policy are passed as query string parameters in InfluxDB 0.9. This makes the API easier to incorporate into libraries and other code, as it does not require any knowledge of the data structure to make valid calls to the API endpoints.

还有其它很多不同的地方,慢慢更新吧

[转帖]InfluxDB 1.2.0安装及新旧版本的注意事项的更多相关文章

  1. 新版本的bettercap不好用, 如何安装和编译旧版本的bettercap

    新版本的bettercap2.0以上是用go语言写的, 各种功能感觉还不太完善, 没有原来的用ruby写的好, 想着回退安装bettercap1.6旧版本 系统环境: kali 2017.2 下载源码 ...

  2. Advanced Installer 安装前卸载旧版本的办法

    原文:Advanced Installer 安装前卸载旧版本的办法 Advanced Installer这个工具百度出来的资料太少了. 在我们平常打包的工作中,经常遇到的一个问题是,如何能在安装新版本 ...

  3. [转帖]VMware Vsphere 6.0安装部署 (三) vCenter Server安装

    VMware Vsphere 6.0安装部署 (三) vCenter Server安装 2016年08月29日 14:59:14 dAng1r0Us 阅读数:72942   版权声明:本文为博主原创文 ...

  4. windows 下升级安装mysql8,与旧版本5.6共存

    应开发需求,自mysql5.7开始引入json列类型和相关函数.为了提高数据读写的访问效率因此把数据库从mysql 5.6版升级到最新发行版 mysql 8.0.11 . 特此记录下多版本升级共存的过 ...

  5. 在java中使用solr7.2.0 新旧版本创建SolrClient对比

    在Java中使用solr 版本7.2.0 solrj已经更新到了7.2.0,新版本solr获取SolrClient的方式也和之前旧版本有所不同 solr6.5开始不推荐直接使用HttpSolrClie ...

  6. [转帖]VMware Vsphere 6.0安装部署 (一) 总体部署架构

    (一)总体部署架构本教程用于学习目的,力求详尽的介绍安装部署过程和各组件之间的关系,部署过程从最简单的模型开始,系列文章按时间顺序依次展开,每篇介绍一个组件. 开始阶段,按照一台物理服务器,部署所有V ...

  7. 【Android 应用开发】 Ubuntu 安装 Android Studio (旧版本|仅作参考)

    . 果断换Ubuntu了, Ubuntu的截图效果不好, 不能设置阴影 ... 作者 : 万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article ...

  8. 分析并解决Linux发行版的自带OpenJdk和自己安装的OracleJdk新旧版本冲突问题

    解决办法: 从Oraclejdk 目录里可执行文件链接都复制到自己的LINK目录,然后IDE使用LINK变量下的命令 本文没有具体解决方法,只有探索思路........................ ...

  9. ubuntu下JDK安装(更新旧版本JAVA)

    1.sudo apt-get install openjdk-8-jre openjdk-8-jdk 2.默认会安装在 路径为 /usr/lib/jvm/java-7-openjdk-amd64 下面 ...

随机推荐

  1. MacOs High Sierra 升级失败解决办法

    进入recovery的方法: Command-R 重新安装您在 Mac 上安装过的最新 macOS,但不会升级到更高的版本. Option-Command-R升级到与您的 Mac 兼容的最新 macO ...

  2. istio 安装与bookinfo示例运行

    目的 本文旨在帮助想了解istio安装和运行bookinfo示例的同学快速入门 前置准备 安装k8s和helm 1.k8s安装 修改主机名 hostnamectl set-hostname k8s-m ...

  3. 2019CSP-J第二轮 B题C题

    B.简单模拟 /* 寻找每一张公交票可用的最早的地铁优惠票,使用过之后一定要销毁*/ #include <iostream> #include <cstdio> #includ ...

  4. HGOI 20191031am 题解

    Problem A Divisors 给出$m$个不同的正整数$a_i$,设数论函数 ​​​$f(k) = \sum\limits_{i = 1}^{n} [(\sum\limits_{j = 1}^ ...

  5. a a[0] &a &a[0]的理解

    数组中几个关键符号(a a[0] &a &a[0])的理解(前提是 int a[10])(1)这4个符号搞清楚了,数组相关的很多问题都有答案了.理解这些符号的时候要和左值右值结合起来, ...

  6. codeforces865C

    Gotta Go Fast CodeForces - 865C You're trying to set the record on your favorite video game. The gam ...

  7. Java字节码例子解析

    举个简单的例子: public class Hello {     public static void main(String[] args) {         String string1 = ...

  8. jQuery属性操作之DOM属性操作

    DOM属性操作是对DOM元素的属性进行读取.设置和移除操作, 比如prop(). removeProp(). 1. prop() 1.1 使用prop()获取返回值 prop() 用于返回属性值时, ...

  9. [linux]kali apt-get 安装mysql

    环境: Linux kali 4.18.0-kali2-amd64 #1 SMP Debian 4.18.10-2kali1 (2018-10-09) x86_64 GNU/Linux 本来是想要装m ...

  10. Leetcode题目160.相交链表(简单)

    题目描述 编写一个程序,找到两个单链表相交的起始节点. 如下面的两个链表: 在节点 c1 开始相交. 输入:intersectVal = 8, listA = [4,1,8,4,5], listB = ...