Skip to content

Commit

Permalink
[disk] disable all_partitions by default
Browse files Browse the repository at this point in the history
  • Loading branch information
degemer committed Jun 16, 2015
1 parent 790f5e8 commit b71e8e5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion checks.d/disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def _load_conf(self, instance):
self._tag_by_filesystem = _is_affirmative(
instance.get('tag_by_filesystem', False))
self._all_partitions = _is_affirmative(
instance.get('all_partitions', True))
instance.get('all_partitions', False))

# FIXME: 6.x, drop use_mount option in datadog.conf
self._load_legacy_option(instance, 'use_mount', False,
Expand Down
4 changes: 2 additions & 2 deletions conf.d/disk.yaml.default
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ instances:
# tag_by_filesystem: no
#
# The (optional) all_partitions parameter will instruct the check to
# only get metrics for physical disks if set to no
# all_partitions: yes
# get metrics for all partitions (and not only physical disks)
# all_partitions: no

2 changes: 1 addition & 1 deletion tests/checks/mock/test_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def test_default_options(self):
self.assertEqual(self.check._excluded_filesystems, [])
self.assertEqual(self.check._excluded_disks, [])
self.assertFalse(self.check._tag_by_filesystem)
self.assertTrue(self.check._all_partitions)
self.assertFalse(self.check._all_partitions)
self.assertEqual(self.check._excluded_disk_re, re.compile('^$'))

def test_ignore_empty_regex(self):
Expand Down

0 comments on commit b71e8e5

Please sign in to comment.