Graphite template related functions¶
Graphite template parsing functions per InfluxDB’s Graphite service template syntax
-
exception
influxgraph.templates.
InvalidTemplateError
¶ Raised on Graphite template configuration validation errors
-
exception
influxgraph.templates.
TemplateMatchError
¶ Raised on errors matching template with path
-
class
influxgraph.templates.
TemplateFilter
(pattern)¶ Filter metric paths on template pattern
-
influxgraph.templates.
apply_template
(metric_path_parts, template, default_tags, separator='.')¶ Apply template to metric path parts and return measurements, tags and field
Raises: mod:TemplateMatchError on error matching template
Get list of metric paths from list of InfluxDB series with tags and configured graphite templates if any.
Without graphite template configuration tags are dropped and only the series name is used.
-
influxgraph.templates.
heapsort
(iterable)¶ Perform heap sort on iterable
Parameters: iterable – Iterable with (index, value) tuple entries to sort on index value. index must be integer, value can be anything :type iterable: tupleiterator
-
influxgraph.templates.
parse_influxdb_graphite_templates
(templates, separator='.')¶ Parse InfluxDB template configuration and return parsed templates
Parameters: Raises: InvalidTemplateError
on invalid template format used in anytemplate pattern