Last run of metricbeat module

The configured period is available to the metricset through the ModuleConfig (e.g. ms.Module().Config().Period).

You could store in memory the time of the last fetch and use that in your query so that you fetch only information newer than that last fetch time.