OpenTSDB Configuration Doc

来源:互联网 发布:mac怎么保存图片到u盘 编辑:程序博客网 时间:2024/06/06 16:51

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 clustertsd.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 clustertsd.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
原创粉丝点击