Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Statistics never reset path_total value #2331

@kamil-certat

Description

@kamil-certat

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorcomponent: core

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions