add Monitoring model

This commit is contained in:
Son NK 2020-08-15 13:15:20 +02:00
parent d8e4396a70
commit c0f263ee70
1 changed files with 15 additions and 0 deletions

View File

@ -1734,3 +1734,18 @@ class PublicDomain(db.Model, ModelMixin):
"""SimpleLogin domains that all users can use"""
domain = db.Column(db.String(128), unique=True, nullable=False)
class Monitoring(db.Model, ModelMixin):
"""
Store different host information over the time in order to
- alert issues in (almost) real time
- analyze data trending
"""
host = db.Column(db.String(256), nullable=False)
# Postfix stats
incoming_queue = db.Column(db.Integer, nullable=False)
active_queue = db.Column(db.Integer, nullable=False)
deferred_queue = db.Column(db.Integer, nullable=False)