thruk_list_alerts
List host and service alerts from monitoring logs using structured filters on state, time, hostgroup, and custom variables, with AND/OR logic for precise queries.
Instructions
List HOST/SERVICE ALERT entries from the log.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Sort order: a column name, optionally prefixed with '-' for descending (e.g. 'name', '-last_check'); comma-separate multiple keys. Defaults to '-time'. | -time |
| limit | No | ||
| since | No | Start of the time window. Thruk relative time ("-2h", "-7d") or ISO datetime ("2026-05-21 14:00:00"). Omitted = no lower bound. | |
| until | No | End of the time window (same formats as since). Default: now. | |
| filter | No | Structured filter tree supporting AND/OR nesting. Two node types: leaf: {"type":"leaf", "field":"...", "op":"...", "value":...} group: {"type":"group", "operator":"and"|"or", "conditions":[...]} Available fields: custom_var, host, hostgroup, service, since, state, until Operators: eq, gte, in, lte, neq, regex The 'since'/'until' fields accept Thruk relative time ("-2h", "-7d") or ISO datetime ("2026-05-21 14:00:00"). Examples: # Hosts DOWN in HG_AGILE: {"type":"group","operator":"and","conditions":[ {"type":"leaf","field":"hostgroup","op":"eq","value":"HG_AGILE"}, {"type":"leaf","field":"state","op":"eq","value":"down"} ]} # Hosts in HG_AGILE OR with KERNEL=windows: {"type":"group","operator":"or","conditions":[ {"type":"leaf","field":"hostgroup","op":"eq","value":"HG_AGILE"}, {"type":"leaf","field":"custom_var","op":"eq","value":{"var":"KERNEL","val":"windows"}} ]} | |
| offset | No | ||
| columns | No | Comma-separated columns to return. Omit for a curated default set tuned for this tool; pass '' (empty string) to return all available columns. | |
| backends | No | Comma-separated backend names (sites). Omit for all backends. |