Mercurial > prosody-modules
view mod_log_mark/mod_log_mark.lua @ 4776:13e913471b75
mod_http_admin_api: Ensure freshness of metrics when in manual mode
When in manual collection mode, as recommended for Prometheus,
collection needs to be triggered manually, or they would be stale,
possibly dating from the start of the server. This might vary per metric
depending on how and when the metrics are gathered.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Nov 2021 19:26:07 +0100 |
parents | 7be158b3376f |
children |
line wrap: on
line source
module:set_global(); local log = _G.log; module:add_timer(60-os.date("%S"), function (now) log("info", "-- MARK --"); return 90 - ((now + 30) % 60); end);