mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmselect/netstorage: apply Graphite filter after substituting __name__
with name
This commit is contained in:
parent
72ab3f7230
commit
cf18df367d
1 changed files with 6 additions and 6 deletions
|
@ -483,12 +483,6 @@ func GetGraphiteTags(filter string, limit int, deadline searchutils.Deadline) ([
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if len(filter) > 0 {
|
|
||||||
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
|
||||||
if err != nil {
|
|
||||||
return nil, 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__" {
|
||||||
|
@ -497,6 +491,12 @@ func GetGraphiteTags(filter string, limit int, deadline searchutils.Deadline) ([
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if len(filter) > 0 {
|
||||||
|
labels, err = applyGraphiteRegexpFilter(filter, labels)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
}
|
||||||
if limit > 0 && limit < len(labels) {
|
if limit > 0 && limit < len(labels) {
|
||||||
labels = labels[:limit]
|
labels = labels[:limit]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue