千家信息网

opentsdb分布式时间序列数据库如何安装

发表于:2025-02-14 作者:千家信息网编辑
千家信息网最后更新 2025年02月14日,这篇文章将为大家详细讲解有关opentsdb分布式时间序列数据库如何安装,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。简介:opentsdb是一个分布式、易扩展的分
千家信息网最后更新 2025年02月14日opentsdb分布式时间序列数据库如何安装

这篇文章将为大家详细讲解有关opentsdb分布式时间序列数据库如何安装,小编觉得挺实用的,因此分享给大家做个参考,希望大家阅读完这篇文章后可以有所收获。

简介:

opentsdb是一个分布式、易扩展的分布式时间序列数据库。基于HBase做存储,一方面使其能支持海量的数据,一方面也非常容易扩展。主要用于一些服务的监控,比如性能等等。

官方文档:

http://opentsdb.net/docs/build/html/installation.html#runtime-requirements

http://opentsdb.net/docs/build/html/user_guide/configuration.html

前期准备:

  • A Linux system

  • Java Runtime Environment 1.6 or later

  • HBase 0.92 or later

  • GnuPlot 4.2 or later

  • HBase、ZooKeeper:线上已经安装好,文章不在讲述

安装过程:

1) 依赖库安装:

sudo yum install -y gd gd-devel libpng libpng-devel

2) gnuplot-5.0.1安装:

下载,解压,三步走(./configure & make & make install) #不用指定prefix前缀,会安装到prefix指定目录下的 /share /bin /libexec下

3)安装opentsdb,

下载tar或者git clone , ./build.sh #服务器需要能连接外网

编译日志:

Linking into /home/hadoop/opentsdb/build/gwt/queryui --后面遇到了问题,根据编译日志解决

Link succeeded

Compilation succeeded -- 30.289s

/bin/mkdir -p staticroot

cp ../src/tsd/static/favicon.ico ../src/tsd/static/opentsdb_header.jpg staticroot

find -L staticroot -type l -exec rm {} \;

p=`pwd`/gwt/queryui && cd staticroot \

&& for i in $p/*; do ln -s -f "$i" || break; done

find -L staticroot/gwt -type f | xargs touch

make64[1]: Leaving directory `/home/hadoop/opentsdb/build'

建表:

env COMPRESSION=NONE HBASE_HOME=/home/hadoop/hbase-1.0.0-cdh6.5.1/ ./src/create_table.sh #根据需要自己判断是否使用压缩

修改配置:

OpenTSDB 2.2 works off a configuration file that is shared between the daemon and command line tools. If you compiled from source, copy the ./src/opentsdb.conf file to a proper directory as documented in Configuration and edit the following, required settings:tsd.http.cachedir - Path to write temporary files totsd.http.staticroot - Path to the static GUI files found in ./build/staticroottsd.storage.hbase.zk_quorum - If HBase and Zookeeper are not running on the same machine, specify the host and port here.With the config file written, you can start a tsd with the command:You can use the --config command line argument to specify the full path to a configuration file. Otherwise if not specified, OpenTSDB and some of the command-line tools will attempt to search for a valid configuration file in the following locations:./opentsdb.conf/etc/opentsdb.conf/etc/opentsdb/opentsdb.conf/opt/opentsdb/opentsdb.conf
    修改的配置:  cp src/opentsdb.conf .   #按官方文档,复制配置文件到opentsdb安装目录    tsd.network.port = 8999   #端口修改     # The location of static files for the HTTP GUI interface.   # *** REQUIRED ***   tsd.http.staticroot = /home/data/opentsdb/static #自己定义的,有问题,看问题2            = /home/hadoop/opentsdb/build/staticroot #正确的   # Where TSD should write it's cache files to   # *** REQUIRED ***   tsd.http.cachedir = /home/data/opentsdb/cache       tsd.storage.hbase.zk_quorum = host1:2181,host:2181,host3:2181

    ++++++++++++++++++++++++++++++ 遇到的问题和解决办法 ++++++++++++++++++++++++++

    问题1:日志目录

    16:46:33,197 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Active log file name: /var/log/opentsdb/opentsdb.log

    16:46:33,197 |-INFO in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - File property is set to [/var/log/opentsdb/opentsdb.log]

    16:46:33,198 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - Failed to create parent directories for [/var/log/opentsdb/opentsdb.log]

    16:46:33,199 |-ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE] - openFile(/var/log/opentsdb/opentsdb.log,true) call failed. java.io.FileNotFoundException: /var/log/opentsdb/opentsdb.log (No such file or directory)

    修改:src/logback.xml 把日志目录改成自己定义的
    问题2:web界面打不开,日志报找不到文件

    2016-07-05 16:48:03,362 INFO [OpenTSDB I/O Worker #1] HttpQuery: [id: 0xd617c536, /xxx:xxx:xx:xx:52403 => /xx:xx:xx:xx:8999] HTTP /s/opentsdb_header.jpg done in 0ms

    2016-07-05 16:48:03,810 WARN [OpenTSDB I/O Worker #1] HttpQuery: [id: 0xd617c536, /xx:xx:xx:xx:52403 => /xx:xx:xx:xx:8999] File not found: /home/data/opentsdb/static/favicon.ico (No such file or directory)

    查看编译时的日志:

    Linking into /home/hadoop/opentsdb/build/gwt/queryui

    Link succeeded

    Compilation succeeded -- 30.289s

    /bin/mkdir -p staticroot

    cp ../src/tsd/static/favicon.ico ../src/tsd/static/opentsdb_header.jpg staticroot

    修改配置:

    tsd.http.staticroot = /home/hadoop/opentsdb/build/staticroot

    关于"opentsdb分布式时间序列数据库如何安装"这篇文章就分享到这里了,希望以上内容可以对大家有一定的帮助,使各位可以学到更多知识,如果觉得文章不错,请把它分享出去让更多的人看到。

    日志 问题 分布式 数据 目录 配置 序列 数据库 时间 时间序列 篇文章 编译 一方 官方 文件 文档 文章 更多 服务 不错 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 hyper怎么添加服务器 服务器硬件指标说明怎么写 梦幻服务器开服时间计算单位 sql数据库误删了表 游客止步下载软件开发 淄川快消品软件开发价格 通信软件开发经营范围 服务器的硬盘灯没亮了 模拟人生免费版服务器 西安软件开发外派公司 我的世界服务器举报人物会被封吗 软件开发文档都不愿意写 网络技术中间件安全 济南市浪潮服务器代理商电话 数据库类型为timestamp 商丘政务软件开发报价 首都网络安全日绿书签 国家基础地理信息中心数据库 信息化及网络安全答题 云是怎么协调服务器的 互联网科技迷 南山区光纤网络技术开发价格多少 网络安全专家从小白到大神 软件开发工程师的专业技能 fesco网络技术公司 网络安全等级 服务器设置 物流数据库的设计流程 郑州商城软件开发放心省心 各大企业服务器设在哪里 dns本地连接服务器超时
    0