fix: exclude Loki meta-logs from error-rate check (portainer feedback loop)
This commit is contained in:
parent
43ee006f15
commit
50320ab46b
1 changed files with 1 additions and 1 deletions
|
|
@ -170,7 +170,7 @@ def check_error_rate(minutes: int = 30) -> list[dict]:
|
|||
alerts = []
|
||||
now = datetime.now(timezone.utc)
|
||||
for host in all_hosts:
|
||||
q = f'count_over_time({{host="{host}"}} |~ "(?i)error" [{minutes}m])'
|
||||
q = f'count_over_time({{host="{host}"}} |~ "(?i)error" !~ "caller=metrics|query_hash=|executing query|scheduler_processor|Aborted connection|systemd-networkd-wait-online|context canceled|AH01630: client denied|flag evaluation succeeded|pluginsAutoUpdate" [{minutes}m])'
|
||||
data = _query("/loki/api/v1/query", {"query": q, "time": _ns(now)})
|
||||
count = sum(
|
||||
int(float(r.get("value", [None, "0"])[1]))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue