OpenTSDB / opentsdb

A scalable, distributed Time Series Database.
http://opentsdb.net
GNU Lesser General Public License v2.1
5.01k stars 1.25k forks source link

explicit_tags seems to fail consistently #1619

Closed johnseekins closed 5 years ago

johnseekins commented 5 years ago

First:

~# dpkg -l | grep opentsdb
ii  opentsdb                                      2.4.0                                      all          Time Series Daemon from OpenTSDB for storing and accessing time series data

Secondly:

~# curl -Ss "http://int-opentsdb-proxy.datto.lan:4242/api/query?start=30m-ago&m=sum:disk.used_percent\{group=monitoring,host=*,path=*\}" | jq .[].tags.host | sort | uniq | wc -l
108
~# curl -Ss "http://int-opentsdb-proxy.datto.lan:4242/api/query?start=30m-ago&m=sum:explicit_tags:disk.used_percent\{group=monitoring\}\{host=*\}\{path=*\}" | jq .[].tags.host | sort | uniq | wc -l
0

What am I doing wrong here? Based on the docs, these two queries should work approximately the same.

johnseekins commented 5 years ago

@manolama Any thoughts here? This seems to not function as documented and I could use some advice.

johnseekins commented 5 years ago

Ah ha! I understand. The docs are clear, but the example isn't quite right.

If we're using curl, the tags should be in one grouping, e.g. {group=monitoring,host=*,path=*\}. The major requirement is we have to list every tag associated with the metric. In this case, I wasn't.