Commit graph

16 commits

Author SHA1 Message Date
Jens Bissinger
78de4b11db Fix matching empty statsd metric components 2017-11-10 15:29:24 +00:00
Ben Kochie
9accf494a9 Merge pull request #98 from drawks/remove_legacy_mapper
Removes support for legacy mapper config
2017-09-29 10:08:08 +02:00
Dave Rawks
ec3cc120e2 Resolves #84 adds support for regex mappers (#85)
* Added `regex` match_type as valid config callout in both individual mappers
    and mapper defaults
  * Added test coverage for changes
  * Updated documentation to reflect usage of `match_type` parameter and
    provide example of a raw regex match rule
2017-09-29 09:57:17 +02:00
Dave Rawks
892b725faf Removes support for legacy mapper config
* Removed legacy mapper config parser
  * Removed logic to switch to YAML parsing based on mapping filename
  * Removed tests for legacy mapper config
  * Remove references to legacy mapper config format from `README.md`
2017-09-28 11:11:26 -07:00
Brian Akins
93243f61a1 add test case for timer types 2017-07-27 17:01:12 -04:00
Brian Akins
c9510f7f23 add simple YAML config tests 2017-07-27 16:58:10 -04:00
Brian Akins
74975b8411 merge with upstream master 2017-07-26 14:03:08 -04:00
Jason Mooberry
5018c7415a Allow comments in mapping files 2017-05-23 18:12:17 -04:00
Brian Akins
641dc37b5d getMapping now returns 3 values 2017-03-13 08:15:43 -04:00
Ville Törhönen
446b7e6d44 Handle invalid mapping config files (#61)
* When a terminating newline is missing from the metric mapping configuration file, the last definition is not parsed at all. After this change the last 'METRIC_DEFINITION' in the file is equivalent to a newline (either between definitions or as the terminating newline).

* Update mapping, if we are reading the last line of the file. Otherwise we will append the mapping and lose the last label. Since we are updating the mapping in two different places a 'updateMapping' function was introduced.

* Added mapper test for config files without a terminating newline.

* Added another test case where multiple definitions are given without a final terminating newline.

* As suggested by @grobie, we should give an error when a terminating newline is missing. Updated tests accordingly.
2017-02-24 11:48:05 -04:00
Mac Browning
411b071f1f allow metrics with dashes when mapping 2015-10-09 19:38:21 -04:00
Brian Brazil
a054446e2f Correct example, need to specify variables like in bash.
See http://golang.org/pkg/regexp/#Regexp.Expand
2015-04-16 23:35:46 +01:00
Julius Volz
b299c8a72d Fix license headers to match LICENSE file. 2015-02-19 01:04:25 +01:00
Julius Volz
728bdc52ae Ensure valid metric names and change statsd metric escaping. 2013-07-12 14:27:51 +02:00
Julius Volz
eff54bdcf9 Implement config watching and reloading. 2013-07-08 21:00:57 +02:00
Julius Volz
80d504ae46 Implement statsd-to-prometheus metric label mappings. 2013-07-05 23:03:57 +02:00