Skip to content

Commit

Permalink
disk check: rename whitelist/blacklist to include/exclude (#7627)
Browse files Browse the repository at this point in the history
Rename, keeping compatibility with the old names and adding a deprecation warning.
We already had some deprecation warnings, so I've put them all together.
  • Loading branch information
albertvaka authored Sep 29, 2020
1 parent 9025c39 commit f8e78f7
Show file tree
Hide file tree
Showing 6 changed files with 386 additions and 212 deletions.
28 changes: 14 additions & 14 deletions disk/assets/configuration/spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ files:
options:
- template: init_config
options:
- name: file_system_global_blacklist
- name: file_system_global_exclude
description: |
Instruct the check to always add these patterns to `file_system_blacklist`.
Instruct the check to always add these patterns to `file_system_exclude`.
WARNING: Overriding these defaults could negatively impact your system or
the performance of the check.
Expand All @@ -17,9 +17,9 @@ files:
type: array
items:
type: string
- name: device_global_blacklist
- name: device_global_exclude
description: |
Instruct the check to always add these patterns to `device_blacklist`.
Instruct the check to always add these patterns to `device_exclude`.
WARNING: Overriding these defaults could negatively impact your system or
the performance of the check.
Expand All @@ -28,9 +28,9 @@ files:
type: array
items:
type: string
- name: mount_point_global_blacklist
- name: mount_point_global_exclude
description: |
Instruct the check to always add these patterns to `mount_point_blacklist`.
Instruct the check to always add these patterns to `mount_point_exclude`.
WARNING: Overriding these defaults could negatively impact your system or
the performance of the check.
Expand All @@ -56,7 +56,7 @@ files:
example: false
type: boolean
- template: instances/tags
- name: file_system_whitelist
- name: file_system_include
description: |
Instruct the check to only collect from matching file systems.
Expand All @@ -70,7 +70,7 @@ files:
type: array
items:
type: string
- name: file_system_blacklist
- name: file_system_exclude
description: |
Instruct the check to not collect from matching file systems.
Expand All @@ -81,7 +81,7 @@ files:
Devices from pseudo or memory-based file systems can be excluded by disabling the
`include_all_devices` option.
When conflicts arise, this will override `file_system_whitelist`.
When conflicts arise, this will override `file_system_include`.
value:
example:
- tmpfs$
Expand All @@ -90,7 +90,7 @@ files:
type: array
items:
type: string
- name: device_whitelist
- name: device_include
description: |
Instruct the check to only collect from matching devices.
Expand All @@ -104,23 +104,23 @@ files:
type: array
items:
type: string
- name: device_blacklist
- name: device_exclude
description: |
Instruct the check to not collect from matching devices.
Character casing is ignored on Windows. For convenience, the regular
expressions start matching from the beginning and therefore to match
anywhere you must prepend `.*`. For exact matches append `$`.
When conflicts arise, this will override `device_whitelist`.
When conflicts arise, this will override `device_include`.
value:
example:
- /dev/sde
- '[FJ]:'
type: array
items:
type: string
- name: mount_point_whitelist
- name: mount_point_include
description: |
Instruct the check to only collect from matching mount points.
Expand All @@ -134,7 +134,7 @@ files:
type: array
items:
type: string
- name: mount_point_blacklist
- name: mount_point_exclude
description: |
Instruct the check to not collect from matching mount points.
Expand Down
46 changes: 23 additions & 23 deletions disk/datadog_checks/disk/data/conf.yaml.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,30 @@
#
init_config:

## @param file_system_global_blacklist - list of strings - optional
## Instruct the check to always add these patterns to `file_system_blacklist`.
## @param file_system_global_exclude - list of strings - optional
## Instruct the check to always add these patterns to `file_system_exclude`.
##
## WARNING: Overriding these defaults could negatively impact your system or
## the performance of the check.
#
# file_system_global_blacklist:
# file_system_global_exclude:
# - iso9660$

## @param device_global_blacklist - list of strings - optional
## Instruct the check to always add these patterns to `device_blacklist`.
## @param device_global_exclude - list of strings - optional
## Instruct the check to always add these patterns to `device_exclude`.
##
## WARNING: Overriding these defaults could negatively impact your system or
## the performance of the check.
#
# device_global_blacklist: []
# device_global_exclude: []

## @param mount_point_global_blacklist - list of strings - optional
## Instruct the check to always add these patterns to `mount_point_blacklist`.
## @param mount_point_global_exclude - list of strings - optional
## Instruct the check to always add these patterns to `mount_point_exclude`.
##
## WARNING: Overriding these defaults could negatively impact your system or
## the performance of the check.
#
# mount_point_global_blacklist:
# mount_point_global_exclude:
# - (/host)?/proc/sys/fs/binfmt_misc$

## Every instance is scheduled independent of the others.
Expand All @@ -52,18 +52,18 @@ instances:
# - <KEY_1>:<VALUE_1>
# - <KEY_2>:<VALUE_2>

## @param file_system_whitelist - list of strings - optional
## @param file_system_include - list of strings - optional
## Instruct the check to only collect from matching file systems.
##
## Character casing is ignored. For convenience, the regular expressions
## start matching from the beginning and therefore to match anywhere you
## must prepend `.*`. For exact matches append `$`.
#
# file_system_whitelist:
# file_system_include:
# - ext[34]$
# - ntfs$

## @param file_system_blacklist - list of strings - optional
## @param file_system_exclude - list of strings - optional
## Instruct the check to not collect from matching file systems.
##
## Character casing is ignored. For convenience, the regular expressions
Expand All @@ -73,56 +73,56 @@ instances:
## Devices from pseudo or memory-based file systems can be excluded by disabling the
## `include_all_devices` option.
##
## When conflicts arise, this will override `file_system_whitelist`.
## When conflicts arise, this will override `file_system_include`.
#
# file_system_blacklist:
# file_system_exclude:
# - tmpfs$
# - rootfs$
# - autofs$

## @param device_whitelist - list of strings - optional
## @param device_include - list of strings - optional
## Instruct the check to only collect from matching devices.
##
## Character casing is ignored on Windows. For convenience, the regular
## expressions start matching from the beginning and therefore to match
## anywhere you must prepend `.*`. For exact matches append `$`.
#
# device_whitelist:
# device_include:
# - /dev/sda[1-3]
# - 'C:'

## @param device_blacklist - list of strings - optional
## @param device_exclude - list of strings - optional
## Instruct the check to not collect from matching devices.
##
## Character casing is ignored on Windows. For convenience, the regular
## expressions start matching from the beginning and therefore to match
## anywhere you must prepend `.*`. For exact matches append `$`.
##
## When conflicts arise, this will override `device_whitelist`.
## When conflicts arise, this will override `device_include`.
#
# device_blacklist:
# device_exclude:
# - /dev/sde
# - '[FJ]:'

## @param mount_point_whitelist - list of strings - optional
## @param mount_point_include - list of strings - optional
## Instruct the check to only collect from matching mount points.
##
## Character casing is ignored on Windows. For convenience, the regular
## expressions start matching from the beginning and therefore to match
## anywhere you must prepend `.*`. For exact matches append `$`.
#
# mount_point_whitelist:
# mount_point_include:
# - /dev/sda[1-3]
# - 'C:'

## @param mount_point_blacklist - list of strings - optional
## @param mount_point_exclude - list of strings - optional
## Instruct the check to not collect from matching mount points.
##
## Character casing is ignored on Windows. For convenience, the regular
## expressions start matching from the beginning and therefore to match
## anywhere you must prepend `.*`. For exact matches append `$`.
#
# mount_point_blacklist:
# mount_point_exclude:
# - /proc/sys/fs/binfmt_misc
# - /dev/sde
# - '[FJ]:'
Expand Down
Loading

0 comments on commit f8e78f7

Please sign in to comment.