mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-14 16:12:15 +01:00
app/vmselect/netstorage: apply Graphite filter after substituting __name__
with name
This commit is contained in:
parent
6bcbdb18fb
commit
59fb75717e
@ -567,12 +567,6 @@ func GetGraphiteTags(at *auth.Token, denyPartialResponse bool, filter string, li
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, false, err
|
return nil, false, err
|
||||||
}
|
}
|
||||||
if len(filter) > 0 {
|
|
||||||
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
|
||||||
if err != nil {
|
|
||||||
return nil, false, err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Substitute "__name__" with "name" for Graphite compatibility
|
// Substitute "__name__" with "name" for Graphite compatibility
|
||||||
for i := range labels {
|
for i := range labels {
|
||||||
if labels[i] == "__name__" {
|
if labels[i] == "__name__" {
|
||||||
@ -581,6 +575,12 @@ func GetGraphiteTags(at *auth.Token, denyPartialResponse bool, filter string, li
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(filter) > 0 {
|
||||||
|
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
||||||
|
if err != nil {
|
||||||
|
return nil, false, err
|
||||||
|
}
|
||||||
|
}
|
||||||
if limit > 0 && limit < len(labels) {
|
if limit > 0 && limit < len(labels) {
|
||||||
labels = labels[:limit]
|
labels = labels[:limit]
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user