OpenTSDB Configuration Doc

OpenTSDB can be configured via a file on the local system, via command line arguments or a combination or both.

Configuration File


The configuration file conforms to the Java properties specification. Configuration names are lower-case, dotted strings without spaces. Each name is followed by an equals sign, then the value for the property. All OpenTSDB properties start with tsd. Comments or inactive configuration lines are blocked by a hash symbol #. For example:

# List of Zookeeper hosts that manage the HBase cluster
tsd.storage.hbase.zk_quorum = 192.168.1.100

will configure the TSD to connect to Zookeeper on 192.168.1.100.
When combining configuration files and command line arguments, the order of processing is as follows:
1. Default values are loaded
2. Configuration file values are loaded, overriding default values
3. Command line parameters are loaded, overriding config file and default values

Properties


The following is a table of configuration options for all tools. When applicable, the corresponding command line override is provided. Please note that individual command line tools may have their own values so see their documentation for details.

Data Types


Some configuration values require special consideration:

  • Booleans - The following literals will parse to true

    • 1
    • true
    • yes

    Any other values will result in a False. Parsing is case insensitive

  • Strings - Strings, even those with spaces, do not require quotation marks, but some considerations apply:

    • Special characters must be escaped with a backslash include: #, !, =, and : E.g.:
      my.property = Hello World\!
    • Unicode characters must be escaped with their hexadecimal representation, E.g.:
      my.property = \u0009

OpenTSDB文档之配置


OpenTSDB可以通过本地系统中的文件进行配置,也可以通过带参数或者参数集合的命令行来配置。

配置文件


配置跟Java属性格式一致。配置名字由[a-z]跟-组合,不带空格。每一个名字通过=赋值属性。所有的OpenTSDB属性都由tsd开头。注释符号是#。例如

# List of Zookeeper hosts that manage the HBase cluster
tsd.storage.hbase.zk_quorum = 192.168.1.100

这样配置会让TSD用192.168.1.100连接Zookeeper。
当配置文件跟命令行参数需要结合的时候,遵循以下处理:
1. 默认(缺省)值被加载
2. 配置文件中的值被加载,覆盖默认值
3. 命令行参数被加载,覆盖配置文件中的值以及默认值

数据类型


一些配置数值需要特别注意:

  • Booleans - 以下几个值会被解析为true
    • 1
    • true
    • yes

其他数值都会解析成False。不区分大小写。

  • String 字符串,包括带有空格的字符串,都不能加引号,不过以下情况需要注意:
    • 特殊字符需要在其之前加上\,这些字符包括: #, !, = 还有:。例如:
      my.property = Hello World\!
    • Unicode字符需要用十六进制表示法,例如:
      my.property = \u0009
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值