From a7f92756d386f2ff460842c70107fea7e8bd49e7 Mon Sep 17 00:00:00 2001 From: David Calvert Date: Tue, 2 May 2023 15:23:06 +0200 Subject: [PATCH] doc: added undocumented include and exclude flags (#2670) * doc: added undocumented exclude flags Signed-off-by: David Calvert --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 8eca3d05..ba6e1942 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,33 @@ Collectors are enabled by providing a `--collector.` flag. Collectors that are enabled by default can be disabled by providing a `--no-collector.` flag. To enable only some specific collector(s), use `--collector.disable-defaults --collector. ...`. +### Include & Exclude flags + +A few collectors can be configured to include or exclude certain patterns using dedicated flags. The exclude flags are used to indicate "all except", while the include flags are used to say "none except". Note that these flags are mutually exclusive on collectors that support both. + +Example: + +```txt +--collector.filesystem.mount-points-exclude=^/(dev|proc|sys|var/lib/docker/.+|var/lib/kubelet/.+)($|/) +``` + +List: + +Collector | Scope | Include Flag | Exclude Flag +--- | --- | --- | --- +arp | device | --collector.arp.device-include | --collector.arp.device-exclude +cpu | bugs | --collector.cpu.info.bugs-include | N/A +cpu | flags | --collector.cpu.info.flags-include | N/A +diskstats | device | --collector.diskstats.device-include | --collector.diskstats.device-exclude +ethtool | device | N/A | --collector.ethtool.device-exclude +ethtool | metrics | --collector.ethtool.metrics-include | N/A +filesystem | fs-types | N/A | --collector.filesystem.fs-types-exclude +filesystem | mount-points | N/A | --collector.filesystem.mount-points-exclude +netdev | device | --collector.netdev.device-include | --collector.netdev.device-exclude +qdisk | device | --collector.qdisk.device-include | --collector.qdisk.device-exclude +sysctl | all | --collector.sysctl.include | N/A +systemd | unit | --collector.systemd.unit-include | --collector.systemd.unit-exclude + ### Enabled by default Name | Description | OS