Files

34 lines
1.1 KiB
Python

BACKEND_TELEGRAM = "telegram"
BACKEND_MATRIX = "matrix"
PREFIXES = {BACKEND_TELEGRAM: "/", BACKEND_MATRIX: "!"}
RATE_LIMIT_MAX = 5
RATE_LIMIT_WINDOW = 60.0
RATE_LIMITED_COMMANDS = frozenset({"ask", "explain"})
LIST_LIMIT = 20
OUTPUT_MAX = 80
ASK_MAX = 500
AUDIT_ARGS_MAX = 200
REPLY_MAX = 3500
OUTCOME_OK = "ok"
OUTCOME_DENIED = "denied"
OUTCOME_RATE_LIMITED = "rate_limited"
OUTCOME_UNKNOWN = "unknown"
OUTCOME_ERROR = "error"
HELP_LINES = {
"help": "Diese Hilfe",
"status": "Zähler der aktuellen Probleme",
"problems": "Liste der aktuellen Probleme",
"host": "{p}host <name>: Services eines Hosts",
"explain": '{p}explain <host> <service>: KI-Analyse, z.B. {p}explain web01 "CPU load"',
"ask": "{p}ask <frage>: Frage an die KI",
"mute": "{p}mute <host> [service] <dauer> [grund]: Alarme stummschalten, als Antwort auf einen Alarm: {p}mute 2h",
"downtime": "{p}downtime <host> <service> <dauer> [kommentar]: Downtime in Checkmk (mit Bestätigung)",
"confirm": "{p}confirm <code>: Downtime bestätigen",
"cancel": "{p}cancel <code>: Downtime abbrechen",
}
SIMPLE_HELP = frozenset({"help", "status", "problems"})