I'm developing a metricbeat module for a database. I would like to fetch backup information from the database. I don't want to fetch all backup information each time the module runs. Just the information which is new.
Is there a way to get the configured interval of the metricbeat module?
Thank you!
I was already thinking of storing the last execution time in a variable. But when my module was down for some time and it comes up again I would miss the last backup(s) because they are older than the now - period.
This would not be a big deal. The only problem is that a false alert like "backup missing" would be cleared after up to 24h.
To avoid this situation I'll code something like this: If the module comes up and lastExec is nil then I fetch the latest backup. Else, fetch backups which are newer then now - period.
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.