Get the App
SLTechnology News&Howtos  ›  Database  › 

Opentsdb installation and configuration

Shulou Source: shulou.com Published: 2022-06-01 12:36:07 10月03日 Update

1. Introduction

openTSDB (see figure) uses hbase as storage center, it does not need sampling, can collect and store hundreds of millions of data points completely, support second-level data monitoring, thanks to hbase distributed column storage, hbase can flexibly support the increase of metrics, can support the collection of tens of thousands of machines and hundreds of millions of data points. In openTSDB, TSD is a daemon program for hbase to communicate externally. There is no master/slave distinction and no shared state, so using this and the characteristics of hbase clustering can eliminate single points. Users can access the TSD interface directly through telnet or http protocols, or through rpc. Each Server that needs metrics needs to set up a Collector to collect time-series data. This Collector is the script you use to collect data.

Install JDK and configure JAVA_HOME

JAVA_HOME=/usr/java/latest

3. Install hbase of single node

a. Download hbase-0.94.7.tar.gz and unzip it

tar -zxf hbase-0.94.7.tar.gz#cd hbase-0.94.7/conf#vim hbase-site.xmlhbase.tmp.dir/tmp/hbasehbase.rootdirfile:///opt/hbase/hbase-\${user.name}/hbase#mkdir -p /opt/hbase

b. Configure HBASE_HOME

#export HBASE_HOME=/root/OpenTSDB/hbase-0.94.7

C. Start hbase

#/bin/start-hbase.sh

d. View the hbase process

jps Check if there is an HMaster

ps aux| grep hbase

4. Install some software required for openTSDB

yum install gnuplot autoconf git -y

5. Install openTSDB

a. Download opentsdb-1.1.0.tar.gz

#tar -zxf opentsdb-1.1.0.tar.gz#cd opentsdb-1.1.0#./ build.sh

6. Run opneTSDB

Configure environment variables and build hbase table

#env COMPRESSION=none HBASE_HOME=/root/OpenTSDB/hbase-0.94.7 /root/OpenTSDB/opentsdb-1.1.0/src/create_table.sh#./ build/tsdb tsd --port=4242--staticroot=staticroot --cachedir=/tmp/tsdtmp &

The following commands can be run by tsdb

usage: tsdb [args] Valid commands: fsck, import, mkmetric, query, tsd, scan, uid

7. Testing

Collect system load:

cat >loadavg-collector.sh

Tags: Data configuration storage support can be passed run distributed parameters variables available in commands that is sequences interfaces time series servers machines browsers features Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Shulou Information Linux MySQL Docker