我将温度值从我的java代码发布到opentsdb
。所以在其中一个标签中我想显示测量类型,例如读数是在°C
还是°F
。所以我试图从java发布unicode "\u00b0"
,虽然在System.out.println
我能够看到度数符号但是当我发布opentsdb
时不接受该值。
我还阅读了文章,它定义了opentsdb
接受的字符。(在Metrics and Tags section
中)它定义了它接受Unicode
字母。但是当我尝试发送学位的unicode
时它不起作用。那么它接受这些字符的unicode
吗?我怎么发送它们。 http://opentsdb.net/docs/build/html/user_guide/writing.html
以下规则适用于指标和标记值:
But in fact, other than above mentioned characters no other is supported by opentsdb.
从opentsdb版本2.3开始,支持通过config变量指定其他字符(从OpenTsdb: Is Space character allowed in Metric and tag information交叉发布)
tsd.core.tag.allow_specialchars = !@#$%^&*()_+{}|: <>?~`-=[]\;',./°
http://opentsdb.net/docs/build/html/user_guide/configuration.html提供了更多细节