This divides templates into two classes: autoflow and static. This is
controlled by a boolean "autoflow" property on templates. Any autoflow
templates that will be rendered for a host, have their cells arranged in
a left-to-right, top-to-bottom fashion.
Static templates, are assumed to have precise positioning information
for their graphs. The only adjustment made to them will be a translation
of their Y coords so they do not overlap other layouts.
The autoflow templates, after processing, become a static layout as
defined above and are positioned accordingly.
This adds a varnish layout with a single graph for monitoring cache hits
vs. misses. The varnish plugin in Telegraf is able to collect far more
statistics on Varnish (complete list:
https://github.com/influxdata/telegraf/tree/master/plugins/inputs/varnish).
However, by default only hits, misses, and uptime are present in the
configuration. We don't currently have a way for a layout to inspect the
fields present for a particular measurement for it to decide which cells
to show, so this will be necessary if we wish to add monitoring for
things like ESI errors, backend connects, memory stats, threads, etc.
Because the host page now adds group by time()s to queries
automatically, all queries need to have aggregates. This adds aggregates
to the fields used by the Rows and the Throughput graphs on the Postgres
layout.
Using my existing layout chaining, I added layouts wrapped in
go-bindata as the last option for loading layouts. This means
that the data store is preferred over file system over bindata.
With this functionality, we can simply distribute the single-file
binary.