X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=core%2Fstatsmanager.lua;h=d6cbd2bc8662b3102e94dbbcd17ef58e268399f5;hb=075dc530172526a2315a6a16b6f7921da8cb2a0f;hp=62d217ef2a9f2832cadee65a1f46d0ef82afd401;hpb=a8a7682628393dcd077fcb97c2631a3d390dcb35;p=prosody.git diff --git a/core/statsmanager.lua b/core/statsmanager.lua index 62d217ef..d6cbd2bc 100644 --- a/core/statsmanager.lua +++ b/core/statsmanager.lua @@ -28,6 +28,7 @@ if stats_interval then function collect() local mark_collection_done = mark_collection_start(); + fire_event("stats-update"); changed_stats, stats_extra = {}, {}; for stat_name, getter in pairs(stats.get_stats()) do local type, value, extra = getter(); @@ -48,6 +49,7 @@ if stats_interval then end timer.add_task(stats_interval, collect); + prosody.events.add_handler("server-started", function () collect() end, -1); else log("debug", "Statistics collection is disabled"); -- nop