StatusWolf
StatusWolf copied to clipboard
Auto complete tags values
It looks like you're able to suggest a tag based on a metric however the suggestions for possible tag values don't seem to work.
From the opsnTSDB side when chooseing a tag = HTTP /suggest?type=tagk&q=hos From the openTSDB side when chosing a tag value = HTTP /suggest?type=tagv&q=op
When using statuswolf = HTTP /suggest?type=metrics&q=proc.loadavg.1min+host%3D
I'll see if I can make a suggesting in the code and post an update. If there is a trick to getting this to work (autocompletion of possible tag values - please let me know)
So digging into the ApiController.php it looks like you're actually querying tags from metrics hourly and storing them offline for recommendations. Perhaps extend that functionality for tag value recommendations?
The issue is that tag suggestions only work in OpenTSDB v2, in v1 you have to query for a metric first before you can see any tags associated with it. I do have some thoughts for better caching of tags and values matching up to metrics so the suggestions can be made and even suggested in reverse - you could search by tag and find all the metrics that have it associated with them, but I have to sort out the implementation details.