Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(inputs.systemd_units): Support user scoped units (#12053) #15458

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

pegaz
Copy link
Contributor

@pegaz pegaz commented Jun 5, 2024

Summary

Systemctl allows to monitor both system- and user-scoped units while systemd_units plugin currently supports only system units. PR aims to solve this limitation.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #12053

@telegraf-tiger telegraf-tiger bot added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Jun 5, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @pegaz! I do have some comments in the code. Furthermore, the new option needs to be added to the sample.conf file! Also do not forget to run make docs...

plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_test.go Outdated Show resolved Hide resolved
@srebhan srebhan self-assigned this Jun 5, 2024
@srebhan srebhan added the waiting for response waiting for response from contributor label Jun 6, 2024
@powersj
Copy link
Contributor

powersj commented Jun 12, 2024

@pegaz looks like you did push some updates, other than the open README question is this ready for another review?

@telegraf-tiger telegraf-tiger bot removed the waiting for response waiting for response from contributor label Jun 12, 2024
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update @pegaz! I have some more minor comments/suggestions...

plugins/inputs/systemd_units/README.md Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
plugins/inputs/systemd_units/systemd_units_linux.go Outdated Show resolved Hide resolved
@telegraf-tiger
Copy link
Contributor

Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip.
Downloads for additional architectures and packages are available below.

🥳 This pull request decreases the Telegraf binary size by -1.66 % for linux amd64 (new size: 239.6 MB, nightly size 243.7 MB)

📦 Click here to get additional PR build artifacts

Artifact URLs

DEB RPM TAR GZ ZIP
amd64.deb aarch64.rpm darwin_amd64.tar.gz windows_amd64.zip
arm64.deb armel.rpm darwin_arm64.tar.gz windows_arm64.zip
armel.deb armv6hl.rpm freebsd_amd64.tar.gz windows_i386.zip
armhf.deb i386.rpm freebsd_armv7.tar.gz
i386.deb ppc64le.rpm freebsd_i386.tar.gz
mips.deb riscv64.rpm linux_amd64.tar.gz
mipsel.deb s390x.rpm linux_arm64.tar.gz
ppc64el.deb x86_64.rpm linux_armel.tar.gz
riscv64.deb linux_armhf.tar.gz
s390x.deb linux_i386.tar.gz
linux_mips.tar.gz
linux_mipsel.tar.gz
linux_ppc64le.tar.gz
linux_riscv64.tar.gz
linux_s390x.tar.gz

@srebhan srebhan added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 20, 2024
@srebhan srebhan assigned powersj and DStrand1 and unassigned srebhan Jun 20, 2024
@DStrand1 DStrand1 removed their assignment Jun 24, 2024
@powersj powersj merged commit 4a9eba6 into influxdata:master Jun 25, 2024
26 of 27 checks passed
@github-actions github-actions bot added this to the v1.32.0 milestone Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for --user in systemd_units input plugin
4 participants