From dde374e68a285f93d62931fee057043a8b4cf546 Mon Sep 17 00:00:00 2001 From: matt durham Date: Wed, 27 Sep 2023 12:01:37 -0400 Subject: [PATCH] spceific arch configs --- collector/config_bsds.go | 27 ++++++++++++++++++++++++ collector/config_darwin.go | 26 +++++++++++++++++++++++ collector/{config.go => config_linux.go} | 0 collector/config_solaris.go | 22 +++++++++++++++++++ 4 files changed, 75 insertions(+) create mode 100644 collector/config_bsds.go create mode 100644 collector/config_darwin.go rename collector/{config.go => config_linux.go} (100%) create mode 100644 collector/config_solaris.go diff --git a/collector/config_bsds.go b/collector/config_bsds.go new file mode 100644 index 00000000..f7a8a73f --- /dev/null +++ b/collector/config_bsds.go @@ -0,0 +1,27 @@ +// Copyright 2023 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//go:build dragonfly || freebsd || netbsd || openbsd +// +build dragonfly freebsd netbsd openbsd + +package collector + +type NodeCollectorConfig struct { + Filesystem FilesystemConfig + NetDev NetDevConfig + NTP NTPConfig + Path PathConfig + Runit RunitConfig + Supervisord SupervisordConfig + TextFile TextFileConfig +} diff --git a/collector/config_darwin.go b/collector/config_darwin.go new file mode 100644 index 00000000..5470b331 --- /dev/null +++ b/collector/config_darwin.go @@ -0,0 +1,26 @@ +// Copyright 2023 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +type NodeCollectorConfig struct { + DiskstatsDeviceFilter DiskstatsDeviceFilterConfig + Filesystem FilesystemConfig + NetDev NetDevConfig + NTP NTPConfig + Path PathConfig + PowerSupplyClass PowerSupplyClassConfig + Runit RunitConfig + Supervisord SupervisordConfig + TextFile TextFileConfig +} diff --git a/collector/config.go b/collector/config_linux.go similarity index 100% rename from collector/config.go rename to collector/config_linux.go diff --git a/collector/config_solaris.go b/collector/config_solaris.go new file mode 100644 index 00000000..c79f4599 --- /dev/null +++ b/collector/config_solaris.go @@ -0,0 +1,22 @@ +// Copyright 2023 The Prometheus Authors +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package collector + +type NodeCollectorConfig struct { + NTP NTPConfig + Path PathConfig + Runit RunitConfig + Supervisord SupervisordConfig + TextFile TextFileConfig +}