标签:opentsdb centos hbase 0.98
安装命令:rpm -ivh
opentsdb-2.0.1.noarch.rpm
文件目录
安装完后,重要的目录如下:
/etc/opentsdb - Configuration files
/tmp/opentsdb - Temporary cache files
/usr/share/opentsdb - Application files
/usr/share/opentsdb/bin - The "tsdb" startup script that launches a TSD or commandline tools
/usr/share/opentsdb/lib - Java JAR library files
/usr/share/opentsdb/plugins - Location for plugin files and dependencies
/usr/share/opentsdb/static - Static files for the GUI
/usr/share/opentsdb/tools - Scripts and other tools
/var/log/opentsdb - Logs
配置
修改配置文件/usr/share/opentsdb/etc/opentsdb/opentsdb.conf的tsd.storage.hbase.zk_quorum值
tsd.storage.hbase.zk_quorum =hadoop107:2181,hadoop104:2181,hadoop108:2181
创建表
启动之前,需要初始化相关的表
[root@hadoop107 hadoop]# env COMPRESSION=NONE HBASE_HOME=~/hadoop/hbase-0.98.10-hadoop2 /usr/share/opentsdb/tools/create_table.sh
验证表是否成功:
调整脚本,配置JAVA
调整脚本/usr/bin/tsdb添加下列语句:
export PATH=$PATH:/root/hadoop/jdk1.7.0_51/bin
exec java $JVMARGS -classpath "$CLASSPATH" net.opentsdb.tools.$MAINCLASS "$@"
启动服务
service opentsdb start
登录控制台
添加测试指标
通过命令行添加两个指标
编写测试脚本
编写测试脚本loadavg-collector.sh
#!/bin/bash
set -e
while true;do
awk -v now=`date +%s` -v host=`hostname` '{ print "put proc.loadavg.1m "now " "$1" host="host;print "put proc.loadavg.5m "now " "$2" host="host }' /proc/loadavg
sleep 15
done | nc -w 30 192.168.40.107 4242
最后一行改成真实的地址
查看结果
运行一段时间后查看控制台:
opentsdb-2.0.1 RPM包的安装以及测试
标签:opentsdb centos hbase 0.98
原文地址:http://blog.csdn.net/eric_sunah/article/details/44040803