Browse Source

Relabel: Document whole label set is dropped

From the documentation and current tests, it wasn't immediately clear to
me whether the `target` being dropped as the result of a 'drop' action
was a label key-value pair or the entire labelset.

Add a test that documents this behaviour.

Documentation: https://prometheus.io/docs/operating/configuration/
pull/1713/head
Matt Bostock 9 years ago
parent
commit
329a00e44f
  1. 14
      retrieval/relabel_test.go

14
retrieval/relabel_test.go

@ -102,6 +102,20 @@ func TestRelabel(t *testing.T) {
},
output: nil,
},
{
input: model.LabelSet{
"a": "foo",
"b": "bar",
},
relabel: []*config.RelabelConfig{
{
SourceLabels: model.LabelNames{"a"},
Regex: config.MustNewRegexp(".*o.*"),
Action: config.RelabelDrop,
},
},
output: nil,
},
{
input: model.LabelSet{
"a": "abc",

Loading…
Cancel
Save