How json event is consider while logstash processing


(Ganesh) #1

HI All,
I want to process some json file and i'm sending event to logstash using kafka. My json file contains information like this when i process the file how the logstash will consider the event like it will consider as whole message as single event or else it will consider each line as single single event.
{
"glossary": {
"title": "example glossary",
"GlossDiv": {
"title": "S",
"GlossList": {
"GlossEntry": {
"ID": "SGML",
"SortAs": "SGML",
"GlossTerm": "Standard Generalized Markup Language",
"Acronym": "SGML",
"Abbrev": "ISO 8879:1986",
"GlossDef": {
"para": "A meta-markup language, used to create markup languages such as DocBook.",
"GlossSeeAlso": ["GML", "XML"]
},
"GlossSee": "markup"
}
}
}
}
}


(Magnus Bäck) #2

If you use the json codec with your kafka input I'd expect each message to be treated as a single JSON object.


(Ganesh) #3

could you share me the json codec code. how your saying i didnt get clearly


(Magnus Bäck) #4

Put codec => json inside your kafka input.


(Ganesh) #5

Thanks Manusbeack. done


(system) #6

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.