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