Triggering Logstash Input

Hello I am wondering, if there can be a way to allow Logstash input to be triggered by user?

Like for example, I am polling SNMP or HTTP API, and the pollers are set up at their own schedule but if a user wants to initate the polling in real time, would this be possible?

Thanks,
Erik

You cannot affect the schedule of an snmp externally.

If you want HTTP calls on-demand you could create a pipeline that tails a file (or several variations thereof) and pass events to an http filter to make an API call. Thus an API call happens when the user appends a line to the file.

1 Like

Thanks @Badger

This is interesting, I will try this out.

Should I open a feature request to be able to affect the schedule of a logstash input externally or technically what I am asking for a bit impossible?

All of the scheduling functionality is in the rufus library. logstash just defines a function and gives rufus a cronline telling it when to call it. I don't think there would be much interest in adding additional scheduling functionality to logstash itself. That said it does no harm to open an issue on github, even if it does not result in changes being made.

1 Like

thanks for the clarification!