Skip to content

Commit 5078481

Browse files
authored
[receiver/systemd] Promote systemd receiver to alpha (#44647)
#### Description This promotes the systemd receiver to alpha stability. While this is by no means feature complete (e.g. per-unit CPU and memory usage, unit uptime), its current functionality is still useful (for observability around unit failures), and it's clear there is demand for it (e.g. #44420). There are still some open questions about the shape of the exported metrics, such as whether to represent each unit as a resource or not (as discussed in #33532, and what units to default to (see #44646), but I think we'll be better able to answer those once this is used in the wild. #### Documentation Additional examples have been added to the receiver's README.
1 parent 6b44dbc commit 5078481

File tree

6 files changed

+55
-8
lines changed

6 files changed

+55
-8
lines changed

.chloggen/systemd-alpha.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. receiver/filelog)
7+
component: receiver/systemd
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Promote systemd receiver to alpha
11+
12+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
13+
issues: [33532]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext:
19+
20+
# If your change doesn't affect end users or the exported elements of any package,
21+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
22+
# Optional: The change log or logs in which this entry should be included.
23+
# e.g. '[user]' or '[user, api]'
24+
# Include 'user' if the change is relevant to end users.
25+
# Include 'api' if there is a change to a library API.
26+
# Default: '[user]'
27+
change_logs: []

receiver/systemdreceiver/README.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
<!-- status autogenerated section -->
44
| Status | |
55
| ------------- |-----------|
6-
| Stability | [development]: metrics |
6+
| Stability | [alpha]: metrics |
77
| Unsupported Platforms | darwin, windows |
8-
| Distributions | [] |
8+
| Distributions | [contrib] |
99
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fsystemd%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fsystemd) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fsystemd%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fsystemd) |
1010
| Code coverage | [![codecov](https://codecov.io/github/open-telemetry/opentelemetry-collector-contrib/graph/main/badge.svg?component=receiver_systemd)](https://app.codecov.io/gh/open-telemetry/opentelemetry-collector-contrib/tree/main/?components%5B0%5D=receiver_systemd&displayType=list) |
1111
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@atoulme](https://www.github.com/atoulme) |
1212
| Emeritus | [@Hemansh31](https://www.github.com/Hemansh31) |
1313

14-
[development]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#development
14+
[alpha]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#alpha
15+
[contrib]: https://github.com/open-telemetry/opentelemetry-collector-releases/tree/main/distributions/otelcol-contrib
1516
<!-- end autogenerated section -->
1617

1718
The systemd receiver gathers metrics for locally running systemd units.
@@ -38,3 +39,21 @@ systemd.unit.state{systemd.unit.name="nginx", systemd.unit.active_state="refresh
3839
| `units` | `["*.service"]` | The units to scrape, as a list of [patterns]. |
3940

4041
[patterns]: https://www.freedesktop.org/software/systemd/man/latest/systemctl.html#Parameter%20Syntax
42+
43+
## Example
44+
### Basic configuration
45+
In its default configuration, the systemd receiver will scrape all system-level services:
46+
47+
```yaml
48+
receivers:
49+
systemd:
50+
```
51+
52+
### Advanced configuration
53+
54+
```yaml
55+
receivers:
56+
systemd:
57+
scope: user
58+
units: ["emacs.service"]
59+
```

receiver/systemdreceiver/documentation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ metrics:
1818
1919
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | Stability |
2020
| ---- | ----------- | ---------- | ----------------------- | --------- | --------- |
21-
| 1 | Sum | Int | Cumulative | false | Development |
21+
| 1 | Sum | Int | Cumulative | false | Alpha |
2222
2323
#### Attributes
2424

receiver/systemdreceiver/internal/metadata/generated_status.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

receiver/systemdreceiver/metadata.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ type: systemd
33
status:
44
class: receiver
55
stability:
6-
development: [metrics]
7-
distributions: []
6+
alpha: [metrics]
7+
distributions: [contrib]
88
codeowners:
99
active: [atoulme]
1010
emeritus: [Hemansh31]
@@ -35,7 +35,7 @@ metrics:
3535
description: 1 if the check resulted in active_state matching the current state, otherwise 0.
3636
enabled: true
3737
stability:
38-
level: development
38+
level: alpha
3939
sum:
4040
value_type: int
4141
aggregation_temporality: cumulative

reports/distributions/contrib.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ components:
221221
- statsd
222222
- stef
223223
- syslog
224+
- systemd
224225
- tcpcheck
225226
- tcplog
226227
- tlscheck

0 commit comments

Comments
 (0)