rudok
(Krejci Rudo)
February 12, 2019, 9:18am
1
Hi,
Is it possible to rename field containing .index suffix to different name?
Like IF-MIB::ifAdminStatus.10 => AdminStatus
First try ( of course not workig" was:
filter {
mutate {
rename => [ "IF-MIB::ifAdminStatus.*", "AdminStatus" ]
}
}
Thx
Rudolf
Badger
February 12, 2019, 12:17pm
2
You could do that in ruby
ruby {
code => '
event.to_hash.each { |k, v|
newk = k.gsub(/^IF-MIB::if(.*)\.[0-9]+/, "\\1")
if k != newk
event.set(newk, v)
event.remove(k)
end
}
'
}
BUT... if you have multiple occurrences of an item in a MIB (.1, .2, etc) this will lose all except the last.
system
(system)
Closed
March 12, 2019, 1:38pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.