Scan
scanRun a health check across Graylog logs to detect crashes, resource exhaustion, error spikes, 5xx, timeouts, database and auth failures; only fired rules return with counts and samples.
Instructions
Health scan in one call: runs every scan rule (crashes, resource exhaustion, error spikes, new error types, 5xx, timeouts/connectivity, database, auth failures, plus the rules in the config) concurrently with exact counts against a baseline, and returns only what fired, most severe first, with the query, top groups and a sample. Start here for 'is anything wrong?', 'scan for errors', 'check X'. For a specific need pass rules (names/tags) or checks (ad hoc rules).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Extra Lucene filter applied to every rule, e.g. 'env:prod' | |
| range | No | Window to scan, ending now (or at to_time): '15m', '1h', '24h' | 1h |
| rules | No | Rule names or tags from list_scan_rules (e.g. ['errors'], ['connectivity', 'database']); all rules when omitted, unless checks is given (then add 'all' to run them too) | |
| checks | No | Ad hoc rules for what the user asks to scan, same keys as a configured rule: {'name': 'declined', 'query': 'message:declined', 'threshold': 0} fires on any match; {'query': '...', 'growth': 2, 'min_count': 10} on a doubled rate; {'errors_only': true, 'group_by': 'exception', 'new_groups': true} on new error groups. Add 'per_traffic': true to a growth check on anything that follows traffic (errors, 5xx, timeouts) so it compares shares of traffic, with 'traffic_query' for what counts as traffic. Optional keys: severity, exclude, baseline, baseline_shift, confidence (default 0.99), group_by | |
| samples | No | Attach one sample message per finding | |
| streams | No | Stream titles or ids; default the repository's focus, else all. ['*'] for everything | |
| to_time | No | Absolute end; default now | |
| baseline | No | Length of the normal period right before the window, to compare rates with; same as the window by default. A longer one ('24h') is steadier for spiky traffic | |
| instance | No | Instance from list_instances, e.g. 'payment/prod'; the default when omitted | |
| from_time | No | Absolute start, overrides range: ISO 8601 or 'YYYY-MM-DD HH:MM' | |
| min_severity | No | Run only rules at least this severe: critical | high | medium | low | low |
| baseline_shift | No | Seasonal baseline instead: compare with the same window shifted back by this ('1d' for the same hour yesterday, '7d' for last week), several times; the median period is the reference. Use it for traffic with a daily or weekly curve | |
| baseline_periods | No | How many shifted periods baseline_shift compares with |