Sending logs every 2 hours using logstash-forwarder without using cronjob

234 views Asked by At

Is there a way I can send data using the logstash-forwarder every 2 hours or more without using a cronjob script to start and stop the forwarder every time I want to send the data?

1

There are 1 answers

6
Alain Collins On BEST ANSWER

Have LSF monitor logfile2.txt. Every two hours, append the real contents from logfile1.txt onto logfile2.txt, which LSF will then process for you.

(Note that you didn't say that we couldn't use cron at all, just that you didn't want to start/stop LSF with it).