mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vminsert: allow to ingest datadog metrics with simpler tags - not enforcing key:value (#2839)
This commit is contained in:
parent
7eb519b92e
commit
d19e46de55
1 changed files with 6 additions and 3 deletions
|
@ -58,11 +58,14 @@ func insertRows(series []parser.Series, extraLabels []prompbmarshal.Label) error
|
|||
ctx.AddLabel("host", ss.Host)
|
||||
for _, tag := range ss.Tags {
|
||||
n := strings.IndexByte(tag, ':')
|
||||
var name, value string
|
||||
if n < 0 {
|
||||
return fmt.Errorf("cannot find ':' in tag %q", tag)
|
||||
name = tag
|
||||
value = "no_label_value"
|
||||
} else {
|
||||
name = tag[:n]
|
||||
value = tag[n+1:]
|
||||
}
|
||||
name := tag[:n]
|
||||
value := tag[n+1:]
|
||||
if name == "host" {
|
||||
name = "exported_host"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue