From 9ee14d69e592d9dd9a20b5dfe4078682abe7e546 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 23 Oct 2023 15:53:19 -0400 Subject: [PATCH 1/5] [DOCS] Metricbeat: Document `unavailable` and `unknown` as `filesystem.ignore_types` values --- .../system/filesystem/_meta/docs.asciidoc | 27 +++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/metricbeat/module/system/filesystem/_meta/docs.asciidoc b/metricbeat/module/system/filesystem/_meta/docs.asciidoc index 691f9943e31..abd86d5de2c 100644 --- a/metricbeat/module/system/filesystem/_meta/docs.asciidoc +++ b/metricbeat/module/system/filesystem/_meta/docs.asciidoc @@ -12,12 +12,18 @@ This metricset is available on: [float] === Configuration -*`filesystem.ignore_types`* - A list of filesystem types to ignore. Metrics will +*`filesystem.ignore_types`* - An array of filesystem types to ignore. Metrics will not be collected from filesystems matching these types. This setting also affects the `fsstats` metricset. If this option is not set, metricbeat ignores all types for virtual devices in systems where this information is available (e.g. -all types marked as `nodev` in `/proc/filesystems` in Linux systems). This can be set to an empty list (`[]`) -to make metricbeat report all filesystems, regardless of type. +all types marked as `nodev` in `/proc/filesystems` in Linux systems). + +To ignore unavailable volumes, such as CD-ROM drives, include `unavailable` as a +value in the array. To ignore unknown filesystems, include `unknown` as a value +in the array. + +To have metricbeat report on all filesystems, regardless of type, set +`filesystem.ignore_types` to an empty array (`[]`). [float] === Filtering @@ -25,7 +31,7 @@ to make metricbeat report all filesystems, regardless of type. Often there are mounted filesystems that you do not want Metricbeat to report metrics on. One option is to configure Metricbeat to ignore specific filesystem types. This can be accomplished by configuring `filesystem.ignore_types` with -a list of filesystem types to ignore. In this example we are ignoring three +an array of filesystem types to ignore. In this example we are ignoring three types of filesystems. [source,yaml] @@ -37,10 +43,21 @@ metricbeat.modules: filesystem.ignore_types: [nfs, smbfs, autofs] ---- +A common approach is to ignore any `unavailable` or `unknown` filesystems. For example: + +[source,yaml] +---- +metricbeat.modules: + - module: system + period: 30s + metricsets: ["filesystem"] + filesystem.ignore_types: [unavailable, unknown] +---- + Another strategy to deal with these filesystems is to configure a `drop_event` processor that matches the `mount_point` using a regular expression. This type of filtering occurs after the data has been collected so it can be less -efficient than the previous method. +efficient than specifying `filesystem.ignore_types`. [source,yaml] ---- From 0c7880b04567f0bf28d37accdbd9547ecc767d38 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Tue, 24 Oct 2023 07:39:28 -0400 Subject: [PATCH 2/5] Address review feedback --- .../system/filesystem/_meta/docs.asciidoc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/metricbeat/module/system/filesystem/_meta/docs.asciidoc b/metricbeat/module/system/filesystem/_meta/docs.asciidoc index abd86d5de2c..61c7c38f3fa 100644 --- a/metricbeat/module/system/filesystem/_meta/docs.asciidoc +++ b/metricbeat/module/system/filesystem/_meta/docs.asciidoc @@ -12,24 +12,25 @@ This metricset is available on: [float] === Configuration -*`filesystem.ignore_types`* - An array of filesystem types to ignore. Metrics will -not be collected from filesystems matching these types. This setting also -affects the `fsstats` metricset. If this option is not set, metricbeat ignores -all types for virtual devices in systems where this information is available (e.g. -all types marked as `nodev` in `/proc/filesystems` in Linux systems). +*`filesystem.ignore_types`* - An array of filesystem types to ignore. Metrics +will not be collected from filesystems matching these types. If this option is +not set, {metricbeat} ignores all types for virtual devices in systems where this +information is available (e.g. all types marked as `nodev` in +`/proc/filesystems` in Linux systems). This setting affects the `fsstats` +metricset. To ignore unavailable volumes, such as CD-ROM drives, include `unavailable` as a value in the array. To ignore unknown filesystems, include `unknown` as a value in the array. -To have metricbeat report on all filesystems, regardless of type, set +To have {metricbeat} report on all filesystems, regardless of type, set `filesystem.ignore_types` to an empty array (`[]`). [float] === Filtering -Often there are mounted filesystems that you do not want Metricbeat to report -metrics on. One option is to configure Metricbeat to ignore specific filesystem +There may be mounted filesystems that you don't want {metricbeat} to report +metrics on. One option is to configure {metricbeat} to ignore specific filesystem types. This can be accomplished by configuring `filesystem.ignore_types` with an array of filesystem types to ignore. In this example we are ignoring three types of filesystems. From 51636bbeaf7ea6054be754fd7be005817e5d5107 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 2 Nov 2023 15:23:02 -0400 Subject: [PATCH 3/5] Note `unavailable` and `unknown` only apply to Windows --- metricbeat/module/system/filesystem/_meta/docs.asciidoc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/metricbeat/module/system/filesystem/_meta/docs.asciidoc b/metricbeat/module/system/filesystem/_meta/docs.asciidoc index 61c7c38f3fa..81ab4ec8680 100644 --- a/metricbeat/module/system/filesystem/_meta/docs.asciidoc +++ b/metricbeat/module/system/filesystem/_meta/docs.asciidoc @@ -19,9 +19,9 @@ information is available (e.g. all types marked as `nodev` in `/proc/filesystems` in Linux systems). This setting affects the `fsstats` metricset. -To ignore unavailable volumes, such as CD-ROM drives, include `unavailable` as a -value in the array. To ignore unknown filesystems, include `unknown` as a value -in the array. +To ignore unavailable volumes, such as CD-ROM drives, on Windows include +`unavailable` as a value in the array. To ignore unknown filesystems on Windows +, include `unknown` as a value in the array. To have {metricbeat} report on all filesystems, regardless of type, set `filesystem.ignore_types` to an empty array (`[]`). @@ -44,7 +44,7 @@ metricbeat.modules: filesystem.ignore_types: [nfs, smbfs, autofs] ---- -A common approach is to ignore any `unavailable` or `unknown` filesystems. For example: +A common approach is to ignore any `unavailable` or `unknown` filesystems on Windows. For example: [source,yaml] ---- From 387a313fd7c1cbdeb406c50b503726d495dc17f1 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 2 Nov 2023 15:23:38 -0400 Subject: [PATCH 4/5] Fix comma --- metricbeat/module/system/filesystem/_meta/docs.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/metricbeat/module/system/filesystem/_meta/docs.asciidoc b/metricbeat/module/system/filesystem/_meta/docs.asciidoc index 81ab4ec8680..e2b066bd7e8 100644 --- a/metricbeat/module/system/filesystem/_meta/docs.asciidoc +++ b/metricbeat/module/system/filesystem/_meta/docs.asciidoc @@ -20,8 +20,8 @@ information is available (e.g. all types marked as `nodev` in metricset. To ignore unavailable volumes, such as CD-ROM drives, on Windows include -`unavailable` as a value in the array. To ignore unknown filesystems on Windows -, include `unknown` as a value in the array. +`unavailable` as a value in the array. To ignore unknown filesystems on Windows, +include `unknown` as a value in the array. To have {metricbeat} report on all filesystems, regardless of type, set `filesystem.ignore_types` to an empty array (`[]`). From ce4c9cbcad25ad6d8165c4b682339d90ba9e8810 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 2 Nov 2023 15:25:24 -0400 Subject: [PATCH 5/5] Reorder --- metricbeat/module/system/filesystem/_meta/docs.asciidoc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/metricbeat/module/system/filesystem/_meta/docs.asciidoc b/metricbeat/module/system/filesystem/_meta/docs.asciidoc index e2b066bd7e8..68fd77fda98 100644 --- a/metricbeat/module/system/filesystem/_meta/docs.asciidoc +++ b/metricbeat/module/system/filesystem/_meta/docs.asciidoc @@ -19,13 +19,14 @@ information is available (e.g. all types marked as `nodev` in `/proc/filesystems` in Linux systems). This setting affects the `fsstats` metricset. +To have {metricbeat} report on all filesystems, regardless of type, set +`filesystem.ignore_types` to an empty array (`[]`). + + To ignore unavailable volumes, such as CD-ROM drives, on Windows include `unavailable` as a value in the array. To ignore unknown filesystems on Windows, include `unknown` as a value in the array. -To have {metricbeat} report on all filesystems, regardless of type, set -`filesystem.ignore_types` to an empty array (`[]`). - [float] === Filtering