-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Labels
METAI contain multitudesI contain multitudesdata modelAffects the data model and/or SQL schemaAffects the data model and/or SQL schemanew settingNeeds a new setting in settings.py, possibly with validatorNeeds a new setting in settings.py, possibly with validator
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
METAI contain multitudesI contain multitudesdata modelAffects the data model and/or SQL schemaAffects the data model and/or SQL schemanew settingNeeds a new setting in settings.py, possibly with validatorNeeds a new setting in settings.py, possibly with validator
Type
Projects
Status
✅ Done