On Sat, Apr 16, 2022 at 10:06:30AM +0200, Martin Reindl wrote: > > Am 16.04.22 um 03:20 schrieb Lucas Raab: > > Hello, > > > > Here's an update to telegraf 1.22.1. Martin and Omar, this is includes > > the fix mentioned for gopsutil/arm64, correct? Links for reference: > > https://github.com/influxdata/telegraf/pull/10931 > > https://github.com/influxdata/telegraf/releases/tag/v1.22.1 > > https://marc.info/?l=openbsd-ports&m=164831659519143&w=2 > > Correct. > > > I also included convenience patches to use doas instead of sudo for > > unbound and nsd. This follows the patches out there currently for > > pf, OpenSMTPD, and OpenNTPD. I didn't run into any issues obtaining > > stats for either, but other confirmations would be good. > > This should eventually be taken upstream (if GOOS == OpenBSD ...) or via > config option. > > > Example doas lines: > > permit nopass _telegraf cmd /usr/sbin/unbound-control args stats_noreset > > permit nopass _telegraf cmd /usr/sbin/nsd-control args stats_noreset > > Should go in pkg/README? > > > > > Thoughts? > > Needs make update-patches too. > > ===> Applying OpenBSD patch patch-plugins_inputs_all_all_go > Hmm... Looks like a unified diff to me... > The text leading up to this was: > -------------------------- > |Remove linux only plugins > | > |Index: plugins/inputs/all/all.go > |--- plugins/inputs/all/all.go.orig > |+++ plugins/inputs/all/all.go > -------------------------- > Patching file plugins/inputs/all/all.go using Plan A... > Hunk #1 succeeded at 40 (offset 1 line). > Hunk #2 succeeded at 77 (offset 1 line). > Hunk #3 succeeded at 85 (offset 1 line). > Hunk #4 succeeded at 92 (offset 1 line). > Hunk #5 succeeded at 127 (offset 3 lines). > Hunk #6 succeeded at 179 (offset 3 lines). > Hunk #7 succeeded at 198 with fuzz 2 (offset 4 lines). > done > > The rest of your diff is fine, thanks!
Ah! Thanks for catching that! Attached is a new README documenting the doas setup as well as a small reference that it runs with a dedicated login class Lucas
diff e1ca228c119e7e53a36efc63c80e8848c466101a /usr/ports blob - 90c7453693b113b116d2088ad3dc9f7577bea763 file + sysutils/telegraf/Makefile --- sysutils/telegraf/Makefile +++ sysutils/telegraf/Makefile @@ -8,6 +8,7 @@ GH_ACCOUNT = influxdata GH_PROJECT = telegraf GH_TAGNAME = ${MODGO_VERSION} HOMEPAGE = https://www.influxdata.com/time-series-platform/telegraf/ +REVISION = 0 CATEGORIES = sysutils blob - 0e0dfbda7f947ecf20550b00811ef75ba9c6c610 file + sysutils/telegraf/pkg/PLIST --- sysutils/telegraf/pkg/PLIST +++ sysutils/telegraf/pkg/PLIST @@ -2,6 +2,7 @@ @newuser _telegraf:826:_telegraf:telegraf:telegraf user:/var/empty:/sbin/nologin @rcscript ${RCDIR}/telegraf @bin bin/telegraf +share/doc/pkg-readmes/${PKGSTEM} share/examples/login.conf.d/telegraf @sample ${SYSCONFDIR}/login.conf.d/telegraf share/examples/telegraf/ blob - /dev/null file + sysutils/telegraf/pkg/README --- /dev/null +++ sysutils/telegraf/pkg/README @@ -0,0 +1,29 @@ ++----------------------------------------------------------------------- +| Running ${PKGSTEM} on OpenBSD ++----------------------------------------------------------------------- + +doas(1) support +=============== +If you use any of the following input plugins, you do not need to +install and configure sudo: + +* pf +* NSD +* OpenNTPD +* OpenSMTPD +* Unbound + +Below are some example doas.conf(5) lines which could be used. If you +have a nonstandard configuration of those daemons, adjustments to the +location of binaries and arguments may be needed. + +permit nopass _telegraf cmd /usr/sbin/unbound-control args stats_noreset +permit nopass _telegraf cmd /usr/sbin/nsd-control args stats_noreset +permit nopass _telegraf cmd /sbin/pfctl args -s info +permit nopass _telegraf cmd /usr/sbin/ntpd args -s peers +permit nopass _telegraf cmd /usr/sbin/smtpctl args show stats + +Resource Limits +=============== +telegraf runs with a dedicated login class. See /etc/login.conf.d/ for +details.