saisimo02
(Mohamed)
September 2, 2019, 1:08pm
1
Hello,
I have a string field named hostname , when the user have multiple instances I am getting an index in this field.
For example hostname looks like: toto1940,toto1941,toto1942 .
I would like to remove the last element of my field and getting only toto194
Thanks for help
Badger
September 2, 2019, 1:32pm
2
If that is a string you could do it using
dissect { mapping => { "message" => "%{host}0,%{}" } }
1 Like
saisimo02
(Mohamed)
September 2, 2019, 3:11pm
3
Thank you Badger,
I resolved it by using ruby:
ruby {
code => "
event.set('myhostname', event.get('hostname')[0..-2])
"
}
system
(system)
Closed
September 30, 2019, 3:13pm
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.