[转帖]InfluxDB 1.2.0安装及新旧版本的注意事项
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 \$releaseverbaseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stableenabled = 1gpgcheck = 1gpgkey = https://repos.influxdata.com/influxdb.keyEOF |
|
1
2
3
4
5
6
7
8
|
# cat influxdb.repo[influxdb]name = InfluxDB Repository - RHEL $releaseverbaseurl = https://repos.influxdata.com/rhel/$releasever/$basearch/stableenabled = 1gpgcheck = 1gpgkey = 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 databasesname: databasesname----_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安装及新旧版本的注意事项的更多相关文章
- 新版本的bettercap不好用, 如何安装和编译旧版本的bettercap
新版本的bettercap2.0以上是用go语言写的, 各种功能感觉还不太完善, 没有原来的用ruby写的好, 想着回退安装bettercap1.6旧版本 系统环境: kali 2017.2 下载源码 ...
- Advanced Installer 安装前卸载旧版本的办法
原文:Advanced Installer 安装前卸载旧版本的办法 Advanced Installer这个工具百度出来的资料太少了. 在我们平常打包的工作中,经常遇到的一个问题是,如何能在安装新版本 ...
- [转帖]VMware Vsphere 6.0安装部署 (三) vCenter Server安装
VMware Vsphere 6.0安装部署 (三) vCenter Server安装 2016年08月29日 14:59:14 dAng1r0Us 阅读数:72942 版权声明:本文为博主原创文 ...
- windows 下升级安装mysql8,与旧版本5.6共存
应开发需求,自mysql5.7开始引入json列类型和相关函数.为了提高数据读写的访问效率因此把数据库从mysql 5.6版升级到最新发行版 mysql 8.0.11 . 特此记录下多版本升级共存的过 ...
- 在java中使用solr7.2.0 新旧版本创建SolrClient对比
在Java中使用solr 版本7.2.0 solrj已经更新到了7.2.0,新版本solr获取SolrClient的方式也和之前旧版本有所不同 solr6.5开始不推荐直接使用HttpSolrClie ...
- [转帖]VMware Vsphere 6.0安装部署 (一) 总体部署架构
(一)总体部署架构本教程用于学习目的,力求详尽的介绍安装部署过程和各组件之间的关系,部署过程从最简单的模型开始,系列文章按时间顺序依次展开,每篇介绍一个组件. 开始阶段,按照一台物理服务器,部署所有V ...
- 【Android 应用开发】 Ubuntu 安装 Android Studio (旧版本|仅作参考)
. 果断换Ubuntu了, Ubuntu的截图效果不好, 不能设置阴影 ... 作者 : 万境绝尘 转载请注明出处 : http://blog.csdn.net/shulianghan/article ...
- 分析并解决Linux发行版的自带OpenJdk和自己安装的OracleJdk新旧版本冲突问题
解决办法: 从Oraclejdk 目录里可执行文件链接都复制到自己的LINK目录,然后IDE使用LINK变量下的命令 本文没有具体解决方法,只有探索思路........................ ...
- ubuntu下JDK安装(更新旧版本JAVA)
1.sudo apt-get install openjdk-8-jre openjdk-8-jdk 2.默认会安装在 路径为 /usr/lib/jvm/java-7-openjdk-amd64 下面 ...
随机推荐
- ubuntu安装chrome driver
首先下载Chrome Driver(Firefox Driver的安装与该步骤相同) 链接: http://chromedriver.storage.googleapis.com/index.html ...
- node中的http内置模块
Node.js开发的目的就是为了用JavaScript编写Web服务器程序.因为JavaScript实际上已经统治了浏览器端的脚本,其优势就是有世界上数量最多的前端开发人员.如果已经掌握了JavaSc ...
- 在windows使用gvim的感受
用新下载的gvim写几行代码习惯一下,感觉vim用起来要比atom占用的内存少多了,更加的便捷.由于之前一直在用sublime text2,虽然我也很喜欢ST,但我还是抱着膜拜的心态来试了试gvim, ...
- C++11正则表达式初探
C++正则表达式 在此之前都没有了解过C++的正则,不过现在大多数赛事都支持C++11了,因此有必要学习一下,用于快速A签到题. 所在头文件 #include<regex> 正则表达式语法 ...
- HDU 3689 Infinite monkey theorem ——(自动机+DP)
这题由于是一个单词,其实直接kmp+dp也无妨.建立自动机当然也是可以的.设dp[i][j]表示匹配到第i个字母的时候,在单词中处于第j个位置的概率,因此最终的答案是dp[0~m][len],m是输入 ...
- [CSP-S模拟测试]:C(倍增+数学)
题目传送门(内部题152) 输入格式 第一行两个整数$N,Q$. 接下来一行$N$个整数,第$i$个为$a_i$. 接下来的$N-1$行,每行两个整数$u,v$.表示$u,v$之间有一条边. 接下来的 ...
- mybatis 对string类型判断比较 group case when then 综合
[quote] 特别注意两点 一个是where 的用法group的用法 case when的用法 <if test='hasLoanApplicationFlag == "1" ...
- TCP学习
参考 https://coolshell.cn/articles/11564.html https://coolshell.cn/articles/11609.html
- spring boot打包以及centos下部署
spring boot打包以及部署 一.打包 springboot的打包方式有很多种.有打成war的,有打成jar的,也有直接提交到github,通过jekins进行打包部署的.这里主要介绍如何打成j ...
- 修改vscode终端样式
在设置中查找workbench,然后编辑setting.json: "terminal.integrated.cursorBlinking": true, "termin ...