Create one custom document if no data is retrive from the JDBC input

Hi, Its is posible to index one custom document if no data id retrieve from a database?
how can logstash do this?

A jdbc input creates one event for each row in a result set. If the set is empty it will not create an event. You could use two jdbc inputs, one to run the query, one to run a COUNT of the same query. If the count comes back as zero then create the custom document.

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