grafana_logs_link
Build a permanent Grafana Explore link for customer logs and preview recent lines. Identify by customer/component name, filter by substring, and adjust time range.
Instructions
Read-only: build a permanent Grafana Explore (Loki) link for a customer's logs AND return a preview of the most recent lines. Identify the customer/component with free text (e.g. client='april', component='gateway') — it matches case-insensitively against the service_name label, which encodes both. Optionally narrow with line_filter (substring that must appear in the log line). Default range is the last 1 hour; widen with from/to (e.g. from='now-6h'). Returns { query, explore_url, range, preview_count, preview }. Paste explore_url into the ticket; ask the user before widening the range since logs are large.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Range end, e.g. 'now' or epoch ms. | now |
| from | No | Range start, e.g. 'now-1h', 'now-6h', or epoch ms. | now-1h |
| limit | No | Max preview lines (newest first). | |
| client | Yes | Customer name fragment, e.g. 'april', 'alliander', 'apim-cloudgate'. | |
| component | No | Component fragment, e.g. 'gateway', 'engine', 'ui'. | |
| line_filter | No | Only lines containing this substring. |