Skip to content

Support heart beats in argus #1638

@hmpf

Description

@hmpf

There currently is no way for argus to detect that a source is not capable of sending incidents.

We could have a model

class Heartbeat(models.Model):
    id = models.BigIntegerField(primary_key=True)
    source = models.ForeignKey("argus_incidents.SourceSystem")
    last_seen = models.DateTimeField(auto_add_now=True)

and alter SourceSystemType:

   heartbeat = models.BooleanField(default=False)

We would need a background worker that would, for all SourceSystemTypes with heartbeat set to True, check (at an interval set in settings? cron?), look up Heartbeat's with that source, check the last_seen and raise an incident if it's been too long. We could even have heartbeat be a onetoone key to SourceSystem and UPDATE instead of INSERT, but using a foreign key makes it possible to spot trends.

Metadata

Metadata

Assignees

No one assigned

    Labels

    METAI contain multitudesdata modelAffects the data model and/or SQL schemanew settingNeeds a new setting in settings.py, possibly with validator

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions