Getting different log path from API


(Navneet Mathpal) #1

Hi,

I have a requirement where I need to get the file path from an API, I am getting the API in json format , which contains file path, location, etc.
ex-

[{
"filepath" : "d:/systemlogs/systemlog-12-jan-2015",
"errortype" : "systemErrors"
}
{
"filepath" : "d:/MONGOlog/mongoLOG-12-jan-2015",
"errortype" : "mongoLog"
}]

How can I achieve this, as file path does not gives the flexibility to give the relative path , or path from an API,
Any idea how it can be achieved ?

Best Regards,
Navneet


(Magnus Bäck) #2

Logstash doesn't support this. You either need to write a custom input plugin or generate the config file dynamiclly and restart Logstash as necessary.


(Navneet Mathpal) #3

Thank you @magnusbaeck..

How we can dynamically generate the conf file ?

Thanks,
Navneet


(Magnus Bäck) #4

How we can dynamically generate the conf file ?

By writing a script in any language that you're comfortable with?


(system) #5