Introduced
The open source monitoring system, OPENTSDB, uses HBase to store all the timings (without sampling) to build a distributed, scalable time-series database . It supports the second-level data acquisition of all metrics, supports permanent storage, can do capacity planning, and easy access to existing alarm systems. Opentsdb can get the appropriate metrics and storage, indexing, and service from large-scale clusters (including network devices, operating systems, applications) in a cluster, making the data easier to understand, such as web-based, graphical, and so on.
Download Installationrpm Path:HTTPS://GITHUB.COM/OPENTSDB/OPENTSDB/RELEASES/DOWNLOAD/V2.0.1/OPENTSDB-2.0.1.NOARCH.RPM installation command: RPM-IVH opentsdb-2.0.1.noarch.rpm
file directoryafter installation, the following are important directories:
/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
Configuration
To modify the Tsd.storage.hbase.zk_quorum value of a configuration file/usr/share/opentsdb/etc/opentsdb/opentsdb.conf
Tsd.storage.hbase.zk_quorum =hadoop107:2181,hadoop104:2181,hadoop108:2181
Create a tablebefore you start, you need to initialize the related tables
[[email protected]hadoop]# env Compression=none Hbase_home=~/hadoop/hbase-0.98.10-hadoop2/usr/share/opentsdb/tools/create_ Table.shVerify that the table is successful:
To adjust the script, configure the Java tuning Script/USR/BIN/TSDB add the following statement: Export path= $PATH:/root/hadoop/jdk1.7.0_51/binexec java $JVMARGS-classpath "$ CLASSPATH "Net.opentsdb.tools. $MAINCLASS" [Email protected] "
Start Service Opentsdb Start
Log in to the console
Add a test metric add two metrics from the command line [[email protected]bin]#./tsdb mkmetric proc.loadavg.5m[[email protected]bin]#./tsdb mkmetric proc.loadavg.1m
Write test scripts to write test scripts loadavg-collector.sh
#!/bin/bashset-ewhile true;do awk-v now= ' Date +%s '-v host= ' hostname ' {print ' Put proc.loadavg.1m "Now" "$" Host= "Host;print" put Proc.loadavg.5m "Now" "$" host= "host} '/proc/loadavg sleep 15done | Nc-w 30 192.168.40.107 4242
Change the last line to a real address
View the results after running for a period of time to view the console:
Installation and testing of opentsdb-2.0.1 RPM packages