Systemd Receiver
contrib
Maintainers: @atoulme
Source: opentelemetry-collector-contrib
Supported Telemetry
Overview
This scraper generates a metric with a label for service state with a value of1 if the unit is in that state. For
example, the following metrics will be generated if the nginx service is currently active:
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
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-13