OpenTSDB部署
1 安装
本次安装是从 Github下载源码进行编译安装
2 运行环境
- Linux 系统(本次使用CentOS6.5)
- JDK 1.6 及以上(本次使用JDK1.7)
- HBase 0.92 及以上(本次使用HBase1.0.0)
- GnuPlot 4.2 及以上
3 源码编译
3. 1 环境
- A Linux system
- Java Development Kit 1.6 or later
- GnuPlot 4.2 or later
- Autotools(autoconf、automake和libtool)
- Make
- Python
- Git
- 网络连接
3.2 下载源码
下载源码的方式有多种,你可以在linux中使用git clone,也可以到github中下载源码上传到linux中 这里演示的是使用git clone下载
git clone https://github.com/OpenTSDB/opentsdb.git cd opentsdb ./build.sh
在编译完成后你会在opentsdb目录下看到build目录
![](http://upload-images.jianshu.io/upload_images/1160852-6196201268fa3d8d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.3 创建表格
如果你是首次使用OpenTSDB的话,那么需要执行以下命令创建表格,当然你也可以进入hbase shell自行创建
cd /opentsdb/src env COMPRESSION=NONE HBASE_HOME=你的hbasemulu ./create_table.sh eg: env COMPRESSION=NONE HBASE_HOME=/home/hadoop/app/hbase/ ./create_table.sh
执行上面命令之后会在hbase中创建四个表格:
![](http://upload-images.jianshu.io/upload_images/1160852-ebe6296b71558c7d.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
3.4 修改配置文件
1) 进入src目录下,复制该目录下的opentsdb.conf文件至build目录下
cd src cp opentsdb.conf /home/hadoop/app/opentsdb/build/
2) 进入build目录,编辑opentsdb.conf
注意点:
- 下面配置文件中标识为 REQUIRED都是一定要配置的,不然会启动失败
- 需要创建cachedir用来存储缓存文件,并且最好做定时任务进行清理,避免磁盘写满出现无谓的问题
注意下这个属性 tsd.storage.hbase.zk_quorum = master:2181,slave2:2181,slave3:2181 因为我集群中HBase使用的是外置的zookeeper集群,那么这个属性也需要配置跟HBase中相同的zookeeper的路径
# --------- NETWORK ----------
# The TCP port TSD should use for communications
# *** REQUIRED ***
tsd.network.port = 4242# The IPv4 network address to bind to, defaults to all addresses
# tsd.network.bind = 0.0.0.0# Disable Nagel's algorithm, default is True
#tsd.network.tcp_no_delay = true# Determines whether or not to send keepalive packets to peers, default
# is True
tsd.network.keep_alive = true# Determines if the same socket should be used for new connections, default
# is True
#tsd.network.reuse_address = true# Number of worker threads dedicated to Netty, defaults to # of CPUs * 2
#tsd.network.worker_threads = 8# Whether or not to use NIO or tradditional blocking IO, defaults to True
#tsd.network.async_io = true# ----------- HTTP -----------
# The location of static files for the HTTP GUI interface.
# *** REQUIRED ***
tsd.http.staticroot =/home/hadoop/app/opentsdb/build/staticroot# Where TSD should write it's cache files to
# *** REQUIRED ***
tsd.http.cachedir = /home/hadoop/app/opentsdb/build/cachedir# --------- CORE ----------
# Whether or not to automatically create UIDs for new metric types, default
# is False
tsd.core.auto_create_metrics = true# Whether or not to enable the built-in UI Rpc Plugins, default
# is True
#tsd.core.enable_ui = true# Whether or not to enable the built-in API Rpc Plugins, default
# is True
#tsd.core.enable_api = true# --------- STORAGE ----------
# Whether or not to enable data compaction in HBase, default is True
#tsd.storage.enable_compaction = true# How often, in milliseconds, to flush the data point queue to storage,
# default is 1,000
tsd.storage.flush_interval = 1000# Max number of rows to be returned per Scanner round trip
# tsd.storage.hbase.scanner.maxNumRows = 128# Name of the HBase table where data points are stored, default is "tsdb"
#tsd.storage.hbase.data_table = tsdb# Name of the HBase table where UID information is stored, default is "tsdb-uid"
#tsd.storage.hbase.uid_table = tsdb-uid# Path under which the znode for the -ROOT- region is located, default is "/hbase"
#tsd.storage.hbase.zk_basedir = /hbase# A comma separated list of Zookeeper hosts to connect to, with or without
# port specifiers, default is "localhost"
tsd.storage.hbase.zk_quorum = master:2181,slave2:2181,slave3:2181# --------- COMPACTIONS ---------------------------------
# Frequency at which compaction thread wakes up to flush stuff in seconds, default 10
tsd.storage.compaction.flush_interval = 1000# Minimum rows attempted to compact at once, default 100
# tsd.storage.compaction.min_flush_threshold = 100# Maximum number of rows, compacted concirrently, default 10000
# tsd.storage.compaction.max_concurrent_flushes = 10000# Compaction flush speed multiplier, default 2
# tsd.storage.compaction.flush_speed = 2
3.5 启动TSD
进入opentsdb/build目录
cd build
./tsdb tsd
3.6 查看web页面
我们进入OpenTSDB自带的奇丑的不实用的web界面来查看参数时序图,演示使用的192.168.80.175:4242,端口号是在opentsdb.conf中所配置好的端口号
![](http://upload-images.jianshu.io/upload_images/1160852-da94e40813925563.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
以上就是OpenTSDB的部署指南,如果需要部署多个节点的话,只需要将编译好的opentsdb文件夹复制到其他节点,运行即可。
OpenTSDB部署相关推荐
- OpenTSDB部署与使用
2019独角兽企业重金招聘Python工程师标准>>> OpenTSDB 是基于 HBase 存储时间序列数据的一个开源数据库,对于存储监控系统采集的数据来说非常合适,不仅在写入查询 ...
- 基于docker部署 opentsdb + grafana数据监控系统
文章目录 0 前言 1 docker opentsdb部署 2 docker grafana部署 3 python client写入方案 4 数据持久化方案 5 云服务器部署踩坑事项 参考材料 0 前 ...
- Netdata---Linux系统性能实时监控平台部署记录
通常来说,作为一个Linux的SA,很有必要掌握一个专门的系统监控工具,以便能随时了解系统资源的占用情况.下面就介绍下一款Linux性能实时监测工具-Netdata,它是Linux系统实时性能监测工具 ...
- Pinterest从OpenTSDB切换到他们自己的时间序列数据库
从2014年开始,Pinterest工程团队就一直使用OpenTSDB存储和查询指标.由于指标数据量的增长导致了各种性能问题,所以他们使用C++开发了自己的时间序列数据库Goku,并且兼容OpenTS ...
- OpenTSDB介绍
1.OpenTSDB介绍 1.1.OpenTSDB是什么?主要用途是什么? 官方文档这样描述:OpenTSDB is a distributed, scalable Time Series Datab ...
- All Things OpenTSDB
1. OpenTSDB介绍 OpenTSDB用HBase存储所有的时序(无须采样)来构建一个分布式.可伸缩的时间序列数据库.它支持秒级数据采集所有metrics,支持永久存储,可以做容量规划,并很容易 ...
- OpenTSDB 造成 Hbase 整点压力过大问题的排查和解决
业务背景 OpenTSDB 是一款非常适合存储海量时间序列数据的开源软件,使用 HBase 作为存储让它变的非常容易扩展.我们在建设美团性能监控平台的过程中,每天需要处理数以亿计的数据,经过几番探索和 ...
- 解密 云HBase时序引擎OpenTSDB 优化技术
逝者如斯夫,不舍昼夜. -- 孔子 时间如流水,一去不复返.自古不乏对时间流逝的感慨,而现 ...
- TDengine与OpenTSDB对比测试
TDengine与OpenTSDB对比测试 摘要:为帮助用户了解TDengine的指标,此次测试,从数据库的读.写.查询.压缩比等方面对TDengine和OpenTSDB进行了对比测试.从测试结果上看 ...
最新文章
- bio linux 创建_不断升级,Java之BIO、NIO、AIO的演变
- 用tensorflow实现yolov3
- HDU 4635 Strongly connected
- 关于 libpcap的安装
- C++类的前向声明的学习
- 园龄一年了,可还未动笔.
- 上传相关js和jquery对象
- 在Java中调用与系统有关的剪切板Clipboard
- 使用 jQuery 和 KnockoutJS 开发在线股票走势图应用
- 实验一 线性表的顺序存储与实现_线性表的存储结构(java)
- 如何用手机制作电子版证件照?
- 智能合约语言 Solidity 教程系列3 - 函数类型
- 学习在layui中input、select、date日历的onchange事件无效解决方法
- Bug 引发的 18 次重大事故
- redis读数据超时问题查询
- HDU 5773 The All-purpose Zero(最长上升子序列)
- Xaml技术:浅析为什么说一个标签就是new一个对象?
- Autosar DCM 诊断(Diagnostic Communication Manager)
- 复旦大学计算机考研资料汇总
- 【Temasek V9.6】CM13.0 多功能实用增强版 for 华为荣耀5X