Getting different log path from API

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

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.

Thank you @magnusbaeck..

How we can dynamically generate the conf file ?

Thanks,
Navneet

How we can dynamically generate the conf file ?

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