I’m receiving this field domRegisterData-lane1OpticalRxPower
and need to parse lane1
out of it. Then I need to take lane1
and split that into lane
and 1
. I then need to store lane
as a tag and 1
as the value.
Is this possible to do using [[processors.regex]]
?
So far I’ve been able to get lane-1
to write as a field inside my InfluxDB like this:
[[processors.regex]]
order = 2
namepass = ["na_optics"]
[[processors.regex.field_rename]]
pattern = "(domRegisterData)-(\\S+)(\\d+)(\\S+)"
replacement = "${2}-${3}"
result_key = "keep"
How can I store lane
as a tag instead of a field and '1` as its value?