Documentation Index
Fetch the complete documentation index at: https://otel.fyi/llms.txt
Use this file to discover all available pages before exploring further.
Systemd Receiver
Available in: contrib
Maintainers: @atoulme
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
This scraper generates a metric with a label for service state with a value of 1 if the unit is in that state. For
example, the following metrics will be generated if the nginx service is currently active:
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="active"} = 1
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="reloading"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="inactive"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="failed"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="activating"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="deactivating"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="maintenance"} = 0
systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="refreshing"} = 0
Configuration
| Field | Default | Description |
|---|
scope | system | The service manager to gather units from, either system or user. |
units | ["*.service"] | The units to scrape, as a list of patterns. |
Example
Basic configuration
In its default configuration, the systemd receiver will scrape all system-level services:
Advanced configuration
receivers:
systemd:
scope: user
units: ["emacs.service"]
Metrics
| Metric Name | Description | Unit | Type | Attributes |
|---|
✅ systemd.service.cpu.time | Total CPU time spent by this service. | us | Counter | cpu.mode |
❌ systemd.service.restarts | Number of automatic restarts for the service. | {restarts} | Counter | |
✅ systemd.unit.state | 1 if the check resulted in active_state matching the current state, otherwise 0. | 1 | UpDownCounter | systemd.unit.active_state |
Attributes
| Attribute Name | Description | Type | Values |
|---|
cpu.mode | Breakdown of CPU usage by type. | string | system, user |
systemd.unit.active_state | The active state of the unit (https://www.freedesktop.org/software/systemd/man/latest/systemd.html#Units) | string | active, reloading, inactive, failed, activating, deactivating, maintenance, refreshing |
Resource Attributes
| Attribute Name | Description | Type | Enabled |
|---|
systemd.unit.name | Name of the systemd unit | string | ✅ |
Last generated: 2026-04-20