From 6e924fcd5cc2ce79a024b7275d865d7a19c455ed Mon Sep 17 00:00:00 2001 From: Joshua Powers Date: Mon, 26 Sep 2022 12:13:06 -0600 Subject: [PATCH] docs(inputs.cpu): explain macos cpu support requires cgo (#11883) --- plugins/inputs/cpu/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/inputs/cpu/README.md b/plugins/inputs/cpu/README.md index a5c1e64a2..ec42c08e6 100644 --- a/plugins/inputs/cpu/README.md +++ b/plugins/inputs/cpu/README.md @@ -2,6 +2,19 @@ The `cpu` plugin gather metrics on the system CPUs. +## macOS Support + +The [gopsutil][1] library, which is used to collect CPU data, does not support +gathering CPU metrics without CGO on macOS. The user will see a "not +implemented" message in this case. Builds provided by InfluxData do not build +with CGO. + +Users can use the builds provided by [Homebrew][2], which build with CGO, to +produce CPU metrics. + +[1]: https://github.com/shirou/gopsutil/blob/master/cpu/cpu_darwin_nocgo.go +[2]: https://formulae.brew.sh/formula/telegraf + ## Configuration ```toml @sample.conf