-
Notifications
You must be signed in to change notification settings - Fork 311
Description
IntelMQ built-in statistics feature works in the way, that after every restart of the bot, statistics are considered to be counted from 0 (code).
The statistics cache is updated in __stats method. Successful and failure stats are sent every time (with the respect to the delay), however the number of sent messages (lines 472-474) is updated only when a message was sent - paths are never filled with 0, the defaultdict is used. This means, that from the restart to the first sent message, the Redis statistic cache and IntelMQ message counter are out of sync.
Why is it important?
I have a case with daily restarted collector that produces just a one message daily. Due to the described behavior, the cached stats are always filed with 1 - either because it wasn't updated, or because the first message was sent.