Available solutions
OpenRouter traces by OTLP
Overview
This template is designed to collect OpenRouter trace data. It provides a basic span overview with health indicators, durations, statuses, errors.
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- OpenRouter
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Ensure that OpenRouter account is configured to send traces to your OpenTelemetry collector. Each workspace requires separate configuration.
- Ensure that the
TelemetryProviderparameter is configured in the Zabbix server configuration file. - Apply the template to the host.
- Adjust macros if needed.
Note: OpenRouter sends completions traces only.
Macros used
| Name | Description | Default |
|---|---|---|
| {$OPENROUTER.FREQUENCY} | The update interval for OpenTelemetry items. |
1m |
| {$OPENROUTER.LOOPBACK} | The loopback for OpenTelemetry items. |
10m |
| {$OPENROUTER.TIMESHIFT} | The TimeShift for OpenTelemetry items. |
10s |
| {$OPENROUTER.SPAN.ERROR.WARN} | Span error rate threshold, in %. |
5 |
| {$OPENROUTER.SPAN.HIT_LIMIT.WARN} | Span hit limit stop reason rate threshold, in %. |
10 |
| {$OPENROUTER.SPAN.BYOK.WARN} | BYOK spans rate threshold, in %. |
25 |
| {$OPENROUTER.SPAN.PERCENTILE.WARN} | 80th percentile for duration threshold, in seconds. |
10 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Span: Total count | Total number of spans over the last |
Telemetry query | openrouter.span.total Preprocessing
|
| Span: Error count | Number of spans with status code "Error" over the last |
Telemetry query | openrouter.span.status.error Preprocessing
|
| Span: Error rate | Percentage of error spans. |
Calculated | openrouter.span.error.rate Preprocessing
|
| Span: Stop reason [normal] count | Number of spans normally stopped over the last |
Telemetry query | openrouter.span.stop.normal Preprocessing
|
| Span: Stop reason [hit limit] count | Number of spans stopped because of limit hit over the last |
Telemetry query | openrouter.span.stop.hit_limit Preprocessing
|
| Span: Stop reason [error] count | Number of spans stopped because of the error over the last |
Telemetry query | openrouter.span.stop.error Preprocessing
|
| Span: Hit limit rate | Percentage of spans that hit limit. |
Calculated | openrouter.span.hit_limit.rate Preprocessing
|
| Span: BYOK [false] count | Number of spans without your own key over the last |
Telemetry query | openrouter.span.byok.false Preprocessing
|
| Span: BYOK [true] count | Number of spans with your own key over the last |
Telemetry query | openrouter.span.byok.true Preprocessing
|
| Span: BYOK rate | Percentage of BYOK spans. |
Calculated | openrouter.span.byok.rate Preprocessing
|
| Span: Duration, average | Average span duration over the last |
Telemetry query | openrouter.span.duration.avg Preprocessing
|
| Span: Duration, minimum | Minimum span duration over the last |
Telemetry query | openrouter.span.duration.min Preprocessing
|
| Span: Duration, maximum | Maximum span duration over the last |
Telemetry query | openrouter.span.duration.max Preprocessing
|
| Span: Duration, 80th percentile | 80th percentile of span durations over the last |
Telemetry query | openrouter.span.duration.percentile Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OpenRouter: High span error rate | min(/OpenRouter traces by OTLP/openrouter.span.error.rate,5m)>{$OPENROUTER.SPAN.ERROR.WARN} |
Warning | ||
| OpenRouter: High hit limit stop reason rate | min(/OpenRouter traces by OTLP/openrouter.span.hit_limit.rate,5m)>{$OPENROUTER.SPAN.HIT_LIMIT.WARN} |
Warning | ||
| OpenRouter: High BYOK rate | min(/OpenRouter traces by OTLP/openrouter.span.byok.rate,5m)>{$OPENROUTER.SPAN.BYOK.WARN} |
Warning | ||
| OpenRouter: High span duration for 80% of spans | min(/OpenRouter traces by OTLP/openrouter.span.duration.percentile,5m)>{$OPENROUTER.SPAN.PERCENTILE.WARN} |
Warning |
Feedback
Please report any issues with the template at https://support.zabbix.com
You can also provide feedback, discuss the template, or ask for help at ZABBIX forums