Dostupná řešení
Generic OpenTelemetry by OTLP
Overview
This template collects OpenTelemetry (OTLP) telemetry — traces, metrics and logs — via Zabbix's native APM query items (Telemetry query), without external scripts or a Zabbix proxy script layer. It works with any OTLP-instrumented application or with an OpenTelemetry Collector in front of it.
Requirements
Zabbix version: 8.0 and higher.
Tested versions
This template has been tested on:
- OpenTelemetry Collector
Configuration
Zabbix should be configured according to the instructions in the Templates out of the box section.
Setup
- Point your application's OpenTelemetry SDK (or an OpenTelemetry Collector in front of it) at your Zabbix server/proxy's OTLP endpoint.
- Apply this template to a host representing the instrumented application or service.
- Adjust the interval macros if the defaults don't match how often your source actually emits data.
- Adjust thresholds macros.
Macros used
| Name | Description | Default |
|---|---|---|
| {$OTLP.FREQUENCY} | The update interval for OpenTelemetry items. Could be used with context. |
1m |
| {$OTLP.LOOPBACK} | The loopback for OpenTelemetry items. Could be used with context. |
10m |
| {$OTLP.TIMESHIFT} | The TimeShift for OpenTelemetry items. Could be used with context. |
10s |
| {$OTLP.GRANULARITY} | The granularity for OpenTelemetry items. Could be used with context. |
1m |
| {$SPAN.ERROR.WARN} | Span error rate threshold, in %. |
5 |
| {$LOG.SEVERITY.FATAL} | Threshold for |
0 |
| {$LOG.SEVERITY.ERROR} | Threshold for |
5 |
| {$LOG.SEVERITY.WARN} | Threshold for |
10 |
| {$SPAN.OK.DURATION.WARN} | Threshold for |
0.5 |
| {$SPAN.UNSET.DURATION.WARN} | Threshold for |
1 |
Items
| Name | Description | Type | Key and additional info |
|---|---|---|---|
| Get logs | Collect OpenTelemetry log counts grouped by severity. |
Telemetry query | otlp.logs.get |
| Span: Error count | Number of spans with status code "Error". |
Telemetry query | otlp.span.status.error Preprocessing
|
| Span: Error duration | Average duration of spans with status code "Error". |
Telemetry query | otlp.span.status.error.duration Preprocessing
|
| Span: Ok count | Number of spans with status code "Ok". |
Telemetry query | otlp.span.status.ok Preprocessing
|
| Span: Ok duration | Average duration of spans with status code "Ok". |
Telemetry query | otlp.span.status.ok.duration Preprocessing
|
| Span: Unset count | Number of spans with status code "Unset". |
Telemetry query | otlp.span.status.unset Preprocessing
|
| Span: Unset duration | Average duration of spans with status code "Unset". |
Telemetry query | otlp.span.status.unset.duration Preprocessing
|
| System: Uptime | System uptime. |
Telemetry query | otlp.metrics.system.uptime Preprocessing
|
| Metrics: Count | Amount of incoming metrics over the {$OTLP.FREQUENCY:metrics}. |
Telemetry query | otlp.metrics.count Preprocessing
|
| Metrics: Gauge count | Amount of incoming gauge metrics over the {$OTLP.FREQUENCY:gauge}. |
Telemetry query | otlp.metrics_gauge.count Preprocessing
|
| Metrics: Histogram count | Amount of incoming histogram metrics over the {$OTLP.FREQUENCY:histogram}. |
Telemetry query | otlp.metrics_histogram.count Preprocessing
|
| Logs: Info entries count | Number of |
Dependent item | otlp.logs.info Preprocessing
|
| Logs: Warning entries count | Number of |
Dependent item | otlp.logs.warn Preprocessing
|
| Logs: Error entries count | Number of |
Dependent item | otlp.logs.average Preprocessing
|
| Logs: Fatal entries count | Number of |
Dependent item | otlp.logs.high Preprocessing
|
| Span: Error percentage | Percentage of error spans. |
Calculated | otlp.span.error.percentage Preprocessing
|
Triggers
| Name | Description | Expression | Severity | Dependencies and additional info |
|---|---|---|---|---|
| OpenTelemetry: Span duration is too big | min(/Generic OpenTelemetry by OTLP/otlp.span.status.ok.duration,5m)>{$SPAN.OK.DURATION.WARN} |
Warning | ||
| OpenTelemetry: Unset span duration is too big | min(/Generic OpenTelemetry by OTLP/otlp.span.status.unset.duration,5m)>{$SPAN.UNSET.DURATION.WARN} |
Warning | ||
| OpenTelemetry: Warning severity level entries in logs | last(/Generic OpenTelemetry by OTLP/otlp.logs.warn)>{$LOG.SEVERITY.WARN} |
Warning | ||
| OpenTelemetry: Error severity level entries in logs | last(/Generic OpenTelemetry by OTLP/otlp.logs.average)>{$LOG.SEVERITY.ERROR} |
Average | ||
| OpenTelemetry: Fatal severity level entries in logs | last(/Generic OpenTelemetry by OTLP/otlp.logs.high)>{$LOG.SEVERITY.FATAL} |
High | ||
| OpenTelemetry: High span error rate | last(/Generic OpenTelemetry by OTLP/otlp.span.error.percentage)>{$SPAN.ERROR.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