mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
app/vminsert: allow to ingest datadog metrics with simpler tags - not enforcing key:value (#2839)
This commit is contained in:
parent
218dfe7956
commit
af5f967307
1 changed files with 6 additions and 3 deletions
|
@ -58,11 +58,14 @@ func insertRows(at *auth.Token, series []parser.Series, extraLabels []prompbmars
|
|||
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