Commit Graph

11 Commits

Author SHA1 Message Date
Elif T. Kuş daebf68ea2 Rewrote tests for relabel and template (#3754)
* relabel: use testutil for testing

* template: use testutil for testing
2018-03-29 16:02:28 +01:00
Krasi Georgiev b75428ec19 rename package retrieve to scrape
no fucnctinal changes just renaming retrieval to scrape
2018-02-01 09:55:07 +00:00
Goutham Veeramachaneni 5c89cec65c Stricter Relabel Config Checking for Labeldrop/keep (#2510)
* Minor code cleanup

* Labeldrop/Labelkeep Now *Only* Support Regex

Ref promtheus/prometheus#2368
2017-03-18 22:32:08 +01:00
Brian Brazil 6c07453ec1 Only clone the metric in the one place relabelling needs it. (#2292)
This cuts ~17% off memory allocations related to ingesting data
in a basic setup.
2016-12-21 10:00:33 +00:00
Tristan Colgate-McFarlane 4d9134e6d8 Add labeldrop and labelkeep actions. (#2279)
Introduce two new relabel actions. labeldrop, and labelkeep.
These can be used to filter the set of labels by matching regex

- labeldrop: drops all labels that match the regex
- labelkeep: drops all labels that do not match the regex
2016-12-14 10:17:42 +00:00
Matti Savolainen 5a1e909b5d Make TargetLabel in RelabelConfig a string 2016-10-19 00:33:22 +03:00
Matti Savolainen bdaf0ec6a2 simplify regex 2016-10-11 22:00:14 +03:00
Matti Savolainen 23be3dab53 test label name validation 2016-10-11 21:54:33 +03:00
Matti Savolainen 8f77d271b1 validate the label name 2016-10-11 21:48:03 +03:00
Matti Savolainen 56e8e7cac3 Allow target_label to be expanded in replace label 2016-10-11 21:01:22 +03:00
Frederic Branczyk 7714b9c781 move relabeling functionality to its own package
also remove the returned error as it was always nil
2016-08-09 14:19:20 +02:00