OpenTSDB部署
1.1部署环境
Hbase 0.98
CentOS 6
JDK 1.8
GnuPlot 4.2.6
Opentsd-2.1.0
1.2部署步骤
解压tar包
tar –zxvf opentsdb-2.1.0.noarch.rpm
编译安装
cd opentsdb
./build.sh
完成后可以看到build目录
创建表格
首次使用OpenTSDB的话,那么需要执行以下命令创建表格,当然也可以进入hbase shell自行创建
cd /opentsdb/src
env COMPRESSION=NONE HBASE_HOME=你的hbase目录 ./create_table.sh
eg: env COMPRESSION=NONE HBASE_HOME=/home/hadoop/app/hbase/ ./create_table.sh
执行上面命令之后会在hbase中创建四个表格
修改配置文件
进入src目录下,复制该目录下的opentsdb.conf文件至build目录下
cd src
cp opentsdb.conf /home/hadoop/app/opentsdb/build/
进入build目录,编辑opentsdb.conf
注意点:
下面配置文件中标识为 REQUIRED都是一定要配置的,不然会启动失败
需要创建cachedir用来存储缓存文件,并且最好做定时任务进行清理,避免磁盘写满出现无谓的问题
# --------- 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 Net