Count logs
count_logsGet the exact number of log messages matching a query to size a problem. Use it to assess issue scope before deeper investigation.
Instructions
Exact number of messages matching a query. Cheap; use it to size a problem.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Lucene query, '*' for everything | * |
| range | No | Relative range ending now (or at to_time): '15m', '2h', '1d', '1h30m' | |
| streams | No | Stream titles or ids to search in; all streams when omitted | |
| to_time | No | Absolute end, same formats as from_time; default now | |
| instance | No | Graylog instance (environment) from list_instances, e.g. 'staging' or 'prod'; the default instance when omitted | |
| from_time | No | Absolute start: ISO 8601 or 'YYYY-MM-DD HH:MM' in the instance timezone; overrides range |