opentsdb安裝部署

版本:2.3.0
1.下載介質
我這裏下載的是opentsdb-2.3.0.tar.gzjava

2.安裝依賴包
Opentsdb依賴Gnuplot,它 是一個命令行的交互式繪圖工具。
用戶經過輸入命令,能夠逐步設置或修改繪圖環境,並以圖形描述數據或函數,使咱們能夠藉由圖形作更進一步的分析。
yum install gnuplotshell

2.拷貝到相應目錄並解壓安裝
[root@localhost opt]# tar -xvf opentsdb-2.3.0.tar.gz
進入目錄app

cd opentsdb-2.3.0
編譯安裝
./build.sh
cd build
make install函數

make[1]: *** [.javac-stamp] Error 2
make[1]: Leaving directory `/opt/opentsdb-2.3.0/build'
make: *** [all] Error 2
You have new mail in /var/spool/mail/root工具

好像這種方式不行oop

3.換另一種方式進行ui

[root@localhost opentsdb-2.3.0]# pwd
/opt/opentsdb-2.3.0
[root@localhost opentsdb-2.3.0]# mkdir build
[root@localhost opentsdb-2.3.0]# cp -r third_party ./build
[root@localhost opentsdb-2.3.0]# ./build.shspa

 

4.配置OpenTSDB
配置文件爲:/opt/opentsdb-2.3.0/src/opentsdb.conf.net

修改的地方以下:
# The TCP port TSD should use for communications
# *** REQUIRED ***
tsd.network.port = 4242
# The location of static files for the HTTP GUI interface.
# *** REQUIRED ***
tsd.http.staticroot =build/staticroot
# Where TSD should write it's cache files to
# *** REQUIRED ***
tsd.http.cachedir = /tmp/tsd
# Whether or not to automatically create UIDs for new metric types, default is False
tsd.core.auto_create_metrics = true
# A comma separated list of Zookeeper hosts to connect to
tsd.storage.hbase.zk_quorum = cdhmanager:2181
# Cover duplicates data
tsd.storage.fix_duplicates = true命令行

 

tsd.network.port = 4242
tsd.network.bind = 0.0.0.0
tsd.network.worker_threads = 8
tsd.http.staticroot = build/staticroot
tsd.http.cachedir = /tmp/opentsdb
tsd.core.auto_create_metrics = true
tsd.storage.hbase.zk_quorum = localhost:2181

 

5.建立hbase表
[root@localhost opentsdb-2.3.0]# cd /opt/opentsdb-2.3.0
[root@localhost opentsdb-2.3.0]# env COMPRESSION=NONE HBASE_HOME=/opt/hbase-1.2.1 ./src/create_table.sh

執行完成後會建立4張表,能夠進入到hbase裏查看
[root@localhost bin]# ./hbase shell
2019-07-24 14:15:42,692 WARN [main] util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
HBase Shell; enter 'help<RETURN>' for list of supported commands.
Type "exit<RETURN>" to leave the HBase Shell
Version 1.2.1, r8d8a7107dc4ccbf36a92f64675dc60392f85c015, Wed Mar 30 11:19:21 CDT 2016

1.8.7-p357 :001 > list
TABLE
tsdb
tsdb-meta
tsdb-tree
tsdb-uid
4 row(s) in 0.2480 seconds

6.啓動
nohup /opt/opentsdb-2.3.0/build/tsdb tsd --config=/opt/opentsdb-2.3.0/src/opentsdb.conf >/dev/null 2>&1 &


7.登錄訪問
http://192.168.1.118:4242

 

8.日誌管理
Opentsdb日誌管理:通常因爲opentsdb默認的日誌特別多,尤爲以nohup啓動的話,日誌頗有可能佔滿整個磁盤。
因此這裏須要修改opentsdb的bug級別。
Opentsdb採用slf4j做爲日誌管理,主要日誌配置在/src/logback.xml文件中,主要的日誌級別以下:
(1)ERROR主要打印錯誤信息,操做失敗等,這將影響opentsdb的正常使用
(2)WARN這是因爲不正確的操做形成的,但不至於影響opentsdb的正常運行
(3)INFO
(4)DEBUG
(5)OFF

日誌文件存放在/var/log/opentsdb下

相關文章
相關標籤/搜索