New supervision

- using fastAPI
- offline/online working
- warning if ZABBIX API is too long
- showing settings
- showing last ack message
- showing procedure
- menu split by SU team
This commit is contained in:
sylvain.chateau
2024-02-05 15:44:27 +01:00
parent f493406b5b
commit f2235d4b45
60 changed files with 10017 additions and 221 deletions

58
schemas/alerts.py Normal file
View File

@@ -0,0 +1,58 @@
from typing import List, Any, Dict, Union, Optional
from pydantic import BaseModel
from schemas.notes import Note
class Group(BaseModel):
groupid: str
name: str
class Host(BaseModel):
host: str
class Tag(BaseModel):
value: str
class Event(BaseModel):
eventid: str
source: str
object: str
objectid: str
clock: str
value: str
acknowledged: str
acknowledges: Optional[List[Any]] = []
ns: str
name: str
severity: str
class Trigger(BaseModel):
description: str
priority: str
triggerid: str
lastchange: str
hosts: List[Host]
groups: List[Group]
tags: List[Tag]
url: str
lastEvent: Event
class ContextModel(BaseModel):
zabbix_url: str
tv_mode: bool
hostgroups: Optional[List[str]] = []
check_servers: Optional[Dict] = {}
alerts: Optional[List] = []
total_alerts: Optional[int] = -1
notes: Any
request: Any
notes: List[Note]
teams: Union[List, Dict]
accepted_latency: Optional[bool] = False
config: Dict[str, Any]
zabbix_available: bool