Commit Graph

18 Commits (65a580779bf3abb27fe484a50df43363b0a2904d)

Author SHA1 Message Date
Jason Wilder a3ab093996 Parse NaN as float
Fixes #3230
2015-07-06 16:14:01 -06:00
Jason Wilder 562d7cd37d Handle timestamp special cases
If no timestamp is sent or the value -1 is sent, the current UTC
time is used.
2015-06-24 23:53:13 -06:00
Jason Wilder fbfb90d66c Code review fixes 2015-06-24 23:33:42 -06:00
Jason Wilder 320a951575 Fix default template being returned when partially matching
another filter.
2015-06-24 23:09:08 -06:00
Jason Wilder a76e812b38 Add graphite parser benchmark 2015-06-24 23:09:08 -06:00
Jason Wilder 9ed71ad492 Add test for matching similar patterns 2015-06-24 23:09:08 -06:00
Jason Wilder f70eee6e7a Add support for multiple measurement fields in templates
Provides a little more flexibility in controlling the parsed
metric names for metris like:

  servers.localhost.cpu.cpu0.user

Previously, you could only use a single field like "cpu", "user"
or a wildcard to match "cpu.cpu0.user".  You can now pull out "cpu"
and "user" and join them together in the metric name using a custom
separator character.  By default this is ".".
2015-06-24 23:09:08 -06:00
Jason Wilder a2a1956048 Use search tree for filter matching
This adds a sorted search tree for matchining filters to a template
more efficiently.  Each filter is split on "." and each element is
added to the tree.  Patterns with matching prefixes are added under
the same subtree.
2015-06-24 23:09:08 -06:00
Jason Wilder dd0e6e5e02 Use strings.Fields to bef more forgiving of whitespace 2015-06-24 23:09:07 -06:00
Jason Wilder b55981f090 Add support for per-template default tags
These are tags that can be added at the template level.  They
will override any global tags and any parsed tags with the same
name from the metric will override these.
2015-06-24 23:09:07 -06:00
Jason Wilder 9cd82ae316 Add support for global tags
These are tags that can be add to all metrics.
2015-06-24 23:09:07 -06:00
Jason Wilder cab9e36111 Add basic template filtering support
This filter implementation is fairly naive and won't scale well
to large numbers of templates and filters.  It will be replaced
with a trie-based approach in the future.
2015-06-24 23:09:07 -06:00
Jason Wilder e5fbf249ff Remove DecodeNameAndTags func 2015-06-24 23:09:07 -06:00
Jason Wilder 46046c6d32 Add matcher for match a metric to a template
If no template matches, use a default template that just matches
the whole metric name as the measurement.
2015-06-24 23:09:07 -06:00
Jason Wilder d69a21c4e4 Allow skipping fields in templates 2015-06-24 23:09:07 -06:00
Jason Wilder a7d4d97743 Convert template matching to matcher struct 2015-06-24 23:09:06 -06:00
Jason Wilder d132263f08 Add support for measurement* 2015-06-24 23:09:06 -06:00
Jason Wilder d539b23817 Move graphite parser to separate file 2015-06-24 23:09:06 -06:00