I have a logstash job (Version 2.2.4) which connects to db and writes the data in ES (once a day)
This is the configuration
input {
jdbc {
// DB and Query
}
}
filter {
ruby {
//Modify the data
}
}
output {
elasticsearch {
// Write in ES
}
}
I would like to get the time from starting the job to the end of this job.
I read the elapsed time plugin, but it seems to me that it is for a specific task.
In my case it will be the time elapsed from the beginning to the end.
Anyone has a suggestion?
Unfortunately, I don't think there is a way to do this.
Logstash is oriented as a pipeline tool, with inputs that are constantly feeding into the filters, which in turn feeds the outputs. Even though some inputs can be configured to shut themselves down when they are done producing events, and a pipeline will shut itself down when it no longer has available inputs, the filters and outputs don't have a way to identify the "last" event.
Warning: Logstash 2.x reached end-of-life in 2016-11 and is no longer receiving patches or updates; please upgrade to a newer version if you are able.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.