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. springboot热部署如果不行

    如果热部署不行先看一眼 Project——>Build Automatically 看这个有没有打对勾,这是热部署的依赖

  2. HGOI 20191105 题解

    Problem A Joker 老虎和蒜头是好朋友. 夏天过去了,凉爽的秋天来临,老虎和蒜头又有了新的娱乐项目.老虎有一个远房表亲是西伯利亚虎,那里流行着一个纸牌游戏:两位玩家参与游戏,道具是一副54 ...

  3. Django-自定义web框架

    自定义web框架 1.准备登录的html <!DOCTYPE html> <html lang="en"> <head> <meta ch ...

  4. D. Shortest Cycle(floyd最小环)

    D. Shortest Cycle time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  5. UVA 12501 Bulky process of bulk reduction ——(线段树成段更新)

    和普通的线段树不同的是,查询x~y的话,给出的答案是第一个值的一倍加上第二个值的两倍一直到第n个值的n倍. 思路的话,就是关于query和pushup的方法.用一个新的变量sum记录一下这个区间里面按 ...

  6. springMVC配置拦截器、过滤器、前端控制器时遇到的问题总结

    1.业务场景:使用vuejs+springMVC+spring框架搭建一个mis系统,集成SSO单点登录: 2.遇到问题:使用interceptor拦截器配置SSO单点登录,直接敲域名,或者ip+端口 ...

  7. RxJava(一):响应式编程与Rx

    一,响应式编程 响应式编程是一种关注于数据流(data streams)和变化传递(propagation of change)的异步编程方式. 1.1 异步编程 传统的编程方式是顺序执行的,必须在完 ...

  8. 实例分析jdom和dom4j的使用和区别 (转)

    实例分析jdom和dom4j的使用和区别   对于xml的解析和生成,我们在实际应用中用的比较多的是JDOM和DOM4J,下面通过例子来分析两者的区别(在这里我就不详细讲解怎么具体解析xml,如果对于 ...

  9. Centos镜像下载地址

    https://blog.csdn.net/weixin_42430824/article/details/81019039

  10. Devops(一):CentOS7 安装Maven3.6.1详解

    https://yq.aliyun.com/topic/78?spm=5176.8290451.656547.7.rMYhAF https://yq.aliyun.com/activity/155?u ...