Basic template setup in Grafana on OpenTSDB

389 views
Skip to first unread message

Andrew H

unread,
Dec 7, 2016, 2:08:48 PM12/7/16
to OpenTSDB
So, I've been trolling the Grafana help sites on this... maybe I should be looking more at the OpenTSDB side of things.  I'm really just trying to get the basics of templating, but I seem to be getting some detail(s) wrong.  Pointers would be appreciated.  Even better, if there are any repos that are just basic, straightforward examples of templating, I'd love to review them.

I have my own little OpenTSDB instance that little token VMs are pushing data to.  I have these metrics and associated keys/values, among others:

fs.stat.used
  -- host
    -- statsgen01
    -- statsgen01
    -- ...
    -- statsgen05
  -- device
    -- (many auto-discovered devices)
fs.stat.used
  (Repeat tags/values)
fs.stat.avail
  (Repeat tags/values)

I want 2 dropdowns.  The first allows the user to select from the metric names.  That one works properly with the following configuration:

Name:  fs
Type:  Query
Data Source:  MyTesterOTSD
Query:  metrics(fs)



The second is supposed to allow the user to select from any of the hosts in the host tag; that is, a dropdown with `statsgen{01..05}` listed in it.  The result should be that the user can, for example, see fs.stat.avail for, say, statsgen03, simply by selecting the appropriate values.  No such luck.  The second one is causing problems.  Is this reasonably possible to do?  I have the following configuration:

Name:  hosts
Type:  Query
Data Source:  MyTesterOTSD
Query:  metrics($fs)
Tags query:  tag_names(fs)
Tag values query:  tag_value(fs, host)

With this result:


:-(

I have 2 variables, $fs and $hosts.  I have enabled tsd.core.meta.enable_realtime_ts.  So... any suggestions?  I get the feeling I just have some little syntactic error or something, but clearly I'm not catching it.  Or maybe I've completely missed the vision here.  Either way, help is greatly appreciated.
2
Not signed in
Reply all
Reply to author
Forward
0 new messages