OpenTSDB安装部署


一、介绍:

  直接从 github 上下载 OpenTSDB;

二、部署:

  1)、安装依赖gnuplot:

    yum install gnuplot
    (error:autoreconf: command not found ;(忘了具体哪个了))
    yum install autoreconf,autoconf,automake,libtool,libffi-dev

  2)、解压opentsdb.tar.gz到指定目录;

  3)、编译:

    # cd opentsdb
    # ./build.sh
    # make install (貌似不用,也执行了)

  安装完成!

    注:编译结束后在build目录下会产生tsdb.jar文件,这个jar依赖的所有jar文件都在当前目录的./third_party下。

      会有一个tsdb的脚本,将用于启动OpenTSDB服务,也是运行其他tools的入口调用脚本。

三、配置文件:

  如使用配置文件,配置opentsdb.conf (./src目录下): 
# 接受请求的端口
tsd.network.port = 4242
 
# 接受请求的网卡
tsd.network.bind = 0.0.0.0
 
# HTTP客户端的GUI静态页面,这个使用默认值即可
tsd.http.staticroot = ./staticroot
 
# cache 路径,最好提前创建好,保证读写权限。
tsd.http.cachedir = /home/opentsdb/tsdb_cache
 
 
# 是否能自动创建统计指标
tsd.core.auto_create_metrics = true
 
# HBase表名称
tsd.storage.hbase.data_table = tsdb
 
# HBase访问相关
# tsd.storage.hbase.zk_basedir = /hbase
tsd.storage.hbase.zk_quorum = master1,master2,slave1,slave2
tsd.storage.fix_duplicates = true
四、创建schema所需表:
     (COMPRESSION可以有NONE/LZO/GZIP/SNAPPY,将创建4张表:tsdb、tsdb-uid、tsdb-tree、tsdb-meta。)
  
  env COMPRESSION=NONE HBASE_HOME=./hbase src/create_table.sh
  
五、启动,指定配置目录:   
  ./tsdb tsd --config=/usr/opentsdb/src/opentsdb.conf
 
六、检测:
  1)、url访问:
 
  

 

 

  
 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM