Need to Insert custom data!


(KMG) #1

My Log file have part of info and API will have a part of information for a SINGLE EVENT

Is it possible to merge these two info as a single document using Logstash [ via any of input-plugin/grok pattern ] ?

For example , below is my log
INFO stream 2015-11-18 14:57:29 7YT65U 1507985470 12.126.143.210 23.231.189.62 443 3625 3752 1.803 http

API Output:
{
"CurrentConnections": "1789",
"TotalConnections": "63689",
"TotalAcceptedConnections": "63589",
"TotalRejectedConnections": "100"
}

I have to merge above two values.

Also please let me know, is there possible to execute scripts in logstash ?.


(Magnus B├Ąck) #2

You'll probably have to write a custom plugin, or maybe make the API call from a ruby filter.


(system) #3