This is about the development process to use the Grafana Simple JSON Datasource plugin to map template variable identifiers to text labels using HTTP requests and more. The outcome of this work yielded the »grafana-metadata-api« already. Thanks @roh, @weef and @wtf for supporting this work.
Occasionally, we run into performance issues with InfluxDB. We are sure this is our fault as we didn’t care for proper database design in time.
Don’t have too many series
Tags containing highly variable information like UUIDs, hashes, and random strings will lead to a large number of series in the database, known colloquially as high series cardinality. High series cardinality is a primary driver of high memory usage for many database workloads.
We definitively want to store associated data in a different data storage location and not inside the main InfluxDB collection for storing measurement data in order to counter the denormalization inherent with the current database schema design.
Grafana feature request
Mark Bell asked for a feature the other day which is also important to us:
Use Case: You may store metrics based on an ‘ID’ property but wish to have the template variable selection UI use a more human friendly label. e.g. You track metrics by domain with an internal domain ID but wish to use the domain’s URL in the template variable selector UI.
@torkelo I can take a cut at implementing this, what are your thoughts on implementation? For my specific use case I would want to be able to provide an arbitrary JS function to perform the value -> text conversion as I need to hit an external service for the lookup. I was thinking an initial implementation could be adding a config value in the dashboard JSON that defines the mapping function. UI support could be added later to handle more trivial mappings with pre built mapping functions (e.g. regex substitutions).
Also connected to this would be the ability to edit the full dashboard JSON via the UI, although export -> edit -> import would function as a workaround if this proves to be difficult.