zabbix-super-vision/schemas/alerts.py
sylvain.chateau f2235d4b45 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
2024-02-05 15:47:38 +01:00

59 lines
1.1 KiB
Python

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