javaunicodespecial-charactersopentsdb

Does opentsdb accept special characters like degree symbol (°), % or ²


I am posting the temperature value form my java code to opentsdb. So in one of the tags I wanted to display the measurement-type like whether the reading is in °C or °F. So I tried to post the unicode "\u00b0" from java, though in the System.out.println I am able to see the degree symbol but when I post the opentsdb is not accepting the value.

I also read the article where it defines the characters which are accepted by opentsdb.(in the Metrics and Tags section) and it defines that it accepts Unicode letters. but when I try to send the unicode of degree it doesn't work. So does it accept the unicode of these characters? How can I send them. http://opentsdb.net/docs/build/html/user_guide/writing.html


Solution

  • The following rules apply to metric and tag values:

    1. Strings are case sensitive, i.e. "Sys.Cpu.User" will be stored separately from "sys.cpu.user"
    2. Spaces are not allowed.
    3. Only the following characters are allowed: a to z, A to Z, 0 to 9, -, _, ., / or Unicode letters (as per the specification) But in fact, other than above mentioned characters no other is supported by opentsdb.