dyl
(bus)
June 15, 2018, 8:33am
1
Hey guys,
Thanks to my pipeline, I can extract data and store it to a metadata field :
if ([ID2] == "000003")
{
grok
{
match => { "DESCRIPTION" => [ "%{DATA:TEST}/%{WORD:NOM_BATCH}-%{BASE16NUM:DATE_BATCH}-%{GREEDYDATA:RESTE}" ] }
}
ruby
{
code => "@save_the_date = event.get('DATE_BATCH')"
}
}
else
{
ruby
{
code => "event.set('DATE_BATCH', @save_the_date)"
}
So now, how to add_field with @save_the_date content ? because i tried to do :
add_field => {
"TESTDATE" => "%{@save_the_date}"
}
But it doesn't work
Can somebody help me ?
Thx for all
I don't understand. Your second ruby filter should do exactly what you're looking for.
dyl
(bus)
June 15, 2018, 1:49pm
3
I try to do that because in this case @save_the_date is empty .. Look at my first discussion with Badger on this subject to understand better :
Hello everybody,
I have this input log :
INFO;0000;000001;******************************************************************************************************************
INFO;0000;000002;* LOG D'EXECUTION *
INFO;0000;000003;* /data/EDT/batchs/files/logs/MNS014MT-20180612-20180613-0105.log *
INFO;0000;000004;* …
Okay, but then the real problem is that @save_the_date
is empty, not that you can't save it into a field.
I don't know why you started a new thread. The old problem seems to remain unsolved.
dyl
(bus)
June 15, 2018, 2:05pm
5
Ok thx you for answer I'll solve this one and continue to speak on the other one
system
(system)
Closed
July 13, 2018, 2:05pm
6
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.