centos7安装部署opentsdb2.4.0 (2)

vi /usr/lib/systemd/system/opentsdb.service添加以下内容

[Unit] Description=OpenTSDB Service [Service] Type=forking PrivateTmp=yes ExecStart=http://www.likecs.com/usr/share/opentsdb/etc/init.d/opentsdb start ExecStop=http://www.likecs.com/usr/share/opentsdb/etc/init.d/opentsdb stop Restart=on-abort

然后你就发现可以用systemctl status opentsdb了,不过现在服务还是dead状态

注意一下,默认opentsdb配置文件目录:/etc/opentsdb/opentsdb.conf,默认opentsdb日志目录:/var/log/opentsdb

修改/etc/opentsdb/opentsdb.conf配置文件

tsd.network.port = 4242 tsd.http.staticroot = /usr/share/opentsdb/static/ tsd.http.cachedir = /tmp/opentsdb tsd.core.auto_create_metrics = true tsd.core.plugin_path = /usr/share/opentsdb/plugins # zookeeper的地址,即hbase依赖的zookeeper的地址,192.168.0.1:2181,192.168.0.2:2181,192.168.0.3:2181 tsd.storage.hbase.zk_quorum = localhost:2181 tsd.storage.fix_duplicates = true tsd.http.request.enable_chunked = true tsd.http.request.max_chunk = 4096000 tsd.storage.max_tags = 16 # 这里看到了我们上面在hbase中创建的4张表 tsd.storage.hbase.data_table = tsdb tsd.storage.hbase.uid_table = tsdb-uid tsd.storage.hbase.tree_table = tsdb-tree tsd.storage.hbase.meta_table = tsdb-meta # 下面几个配置项到部分源码解析的时候会有介绍,暂时可以先忽略 tsd.storage.enable_appends = true tsd.query.skip_unresolved_tagvs = true hbase.rpc.timeout = 120000

启动opentsdb,systemctl start opentsdb,成功的话,就可以打开opentsdb的界面了:4242/

至此,有关opentsdb的安装部署就完成了。后面我会结合opentsdb部分源码分享一些探究性问题。祝君好运!

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wsfjsg.html