feat!: Deprecate whitelist/blacklist flags

Flags have been deprecated in favour of include/exclude terminology.

Signed-off-by: Ben Reedy <breed808@breed808.com>
This commit is contained in:
Ben Reedy
2023-04-01 17:48:23 +10:00
parent 3627520559
commit fab77d9d31
17 changed files with 465 additions and 161 deletions

View File

@@ -10,21 +10,21 @@ Enabled by default? | No
## Flags
### `--collector.iis.site-whitelist`
### `--collector.iis.site-include`
If given, a site needs to match the whitelist regexp in order for the corresponding metrics to be reported.
If given, a site needs to match the include regexp in order for the corresponding metrics to be reported.
### `--collector.iis.site-blacklist`
### `--collector.iis.site-exclude`
If given, a site needs to *not* match the blacklist regexp in order for the corresponding metrics to be reported.
If given, a site needs to *not* match the exclude regexp in order for the corresponding metrics to be reported.
### `--collector.iis.app-whitelist`
### `--collector.iis.app-include`
If given, an application needs to match the whitelist regexp in order for the corresponding metrics to be reported.
If given, an application needs to match the include regexp in order for the corresponding metrics to be reported.
### `--collector.iis.app-blacklist`
### `--collector.iis.app-exclude`
If given, an application needs to *not* match the blacklist regexp in order for the corresponding metrics to be reported.
If given, an application needs to *not* match the exclude regexp in order for the corresponding metrics to be reported.
## Metrics

View File

@@ -11,13 +11,13 @@ Enabled by default? | Yes
## Flags
### `--collector.logical_disk.volume-whitelist`
### `--collector.logical_disk.volume-include`
If given, a disk needs to match the whitelist regexp in order for the corresponding disk metrics to be reported
If given, a disk needs to match the include regexp in order for the corresponding disk metrics to be reported
### `--collector.logical_disk.volume-blacklist`
### `--collector.logical_disk.volume-exclude`
If given, a disk needs to *not* match the blacklist regexp in order for the corresponding disk metrics to be reported
If given, a disk needs to *not* match the exclude regexp in order for the corresponding disk metrics to be reported
## Metrics

View File

@@ -11,13 +11,13 @@ Enabled by default? | Yes
## Flags
### `--collector.net.nic-whitelist`
### `--collector.net.nic-include`
If given, an interface name needs to match the whitelist regexp in order for the corresponding metrics to be reported
If given, an interface name needs to match the include regexp in order for the corresponding metrics to be reported
### `--collector.net.nic-blacklist`
### `--collector.net.nic-exclude`
If given, an interface name needs to *not* match the blacklist regexp in order for the corresponding metrics to be reported
If given, an interface name needs to *not* match the exclude regexp in order for the corresponding metrics to be reported
## Metrics

View File

@@ -11,35 +11,35 @@ Enabled by default? | No
## Flags
### `--collector.process.whitelist`
### `--collector.process.include`
Regexp of processes to include. Process name must both match whitelist and not
match blacklist to be included. Recommended to keep down number of returned
Regexp of processes to include. Process name must both match `include` and not
match `exclude` to be included. Recommended to keep down number of returned
metrics.
### `--collector.process.blacklist`
### `--collector.process.exclude`
Regexp of processes to exclude. Process name must both match whitelist and not
match blacklist to be included. Recommended to keep down number of returned
Regexp of processes to exclude. Process name must both match `include` and not
match `exclude` to be included. Recommended to keep down number of returned
metrics.
### Example
To match all firefox processes: `--collector.process.whitelist="firefox.*"`.
To match all firefox processes: `--collector.process.include="firefox.*"`.
Note that multiple processes with the same name will be disambiguated by
Windows by adding a number suffix, such as `firefox#2`. Your [regexp](https://en.wikipedia.org/wiki/Regular_expression) must take
these suffixes into consideration.
:warning: The regexp is case-sensitive, so `--collector.process.whitelist="FIREFOX.*"` will **NOT** match a process named `firefox` .
:warning: The regexp is case-sensitive, so `--collector.process.include="FIREFOX.*"` will **NOT** match a process named `firefox` .
To specify multiple names, use the pipe `|` character:
```
--collector.process.whitelist="(firefox|FIREFOX|chrome).*"
--collector.process.include="(firefox|FIREFOX|chrome).*"
```
This will match all processes named `firefox`, `FIREFOX` or `chrome` .
## IIS Worker processes
The process collector also queries the `root\\WebAdministration` WMI namespace to check for running IIS workers. If it successfully retrieves a list from this namespace, it will append the name of the worker's application pool to the corresponding process. Whitelist/blacklist matching occurs before this name is appended, so you don't have to take this name in consideration when writing your expression.
The process collector also queries the `root\\WebAdministration` WMI namespace to check for running IIS workers. If it successfully retrieves a list from this namespace, it will append the name of the worker's application pool to the corresponding process. include/exclude matching occurs before this name is appended, so you don't have to take this name in consideration when writing your expression.
Note that this specific feature **only works** if the [IIS Management Scripts and Tools](https://learn.microsoft.com/en-us/iis/manage/scripting/managing-sites-with-the-iis-wmi-provider) are installed. If they are not installed then all worker processes return as just `w3wp`.

View File

@@ -10,17 +10,17 @@ Enabled by default? | No
## Flags
### `--collector.scheduled_task.whitelist`
### `--collector.scheduled_task.include`
If given, the path of the task needs to match the whitelist regexp in order for the corresponding metrics to be reported.
If given, the path of the task needs to match the include regexp in order for the corresponding metrics to be reported.
E.G. `--collector.scheduled_task.whitelist="Firefox.*"`
E.G. `--collector.scheduled_task.include="Firefox.*"`
### `--collector.scheduled_task.blacklist`
### `--collector.scheduled_task.exclude`
If given, the path of the task needs to *not* match the blacklist regexp in order for the corresponding metrics to be reported.
If given, the path of the task needs to *not* match the exclude regexp in order for the corresponding metrics to be reported.
E.G. `--collector.scheduled_task.blacklist="/Microsoft/.+"`
E.G. `--collector.scheduled_task.exclude="/Microsoft/.+"`
## Metrics

View File

@@ -12,13 +12,13 @@ Enabled by default? | No
## Flags
### `--collector.smtp.server-whitelist`
### `--collector.smtp.server-include`
If given, a virtual SMTP server needs to match the whitelist regexp in order for the corresponding metrics to be reported.
If given, a virtual SMTP server needs to match the include regexp in order for the corresponding metrics to be reported.
### `--collector.smtp.server-blacklist`
### `--collector.smtp.server-exclude`
If given, a virtual SMTP server needs to *not* match the blacklist regexp in order for the corresponding metrics to be reported.
If given, a virtual SMTP server needs to *not* match the exclude regexp in order for the corresponding metrics to be reported.
## Metrics

View File

@@ -6,7 +6,7 @@ collector:
service:
services-where: Name='windows_exporter'
scheduled_task:
blacklist: /Microsoft/.+
include: /Microsoft/.+
log:
level: debug
scrape: