Is it possible to read config from DB?

I want to have configurable filters, basically to compare value from an input data field. I want to have configurable values, which should come from the database(preferred) or file (otherwise): for example

 if([url][IP]== ValuefromDB or fromFile){
    // Do something
  }

Is it possible to achieve this?
Adding to this, I would like to load config without restarting logstash, is it possible?

You might be able to implement this using a jdbc_streaming or jdbc_static filter, or a translate filter in the case of a file. Or if it is really a single value then transfer the value to an environment variable and use a $reference.

If you enable --config.reload.automatic then logstash polls the input file every few seconds to see if it has changed and reloads it when it has changed.

1 Like

@Badger Thanks for the quick reply I have multiple values and this maybe increase. Idealy the condition should be

if (ListOfvaluesfromDB).contains([url[IP])

I hope with jdbc_streaming or jdbc_static filter I can connect any kind of Database ( CouchDB ,MySQL etc)

Meanwhile, I will try dynamic loading by changing --config.reload.automatic

@Badger, Is it possible to read data from Couch DB? Please share some helpful links .Thanks

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