We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 670ec6f commit 20e90c9Copy full SHA for 20e90c9
1 file changed
disk/datadog_checks/disk/disk.py
@@ -235,9 +235,14 @@ def _collect_inodes_metrics(self, mountpoint):
235
metrics = {}
236
# we need to timeout this, too.
237
try:
238
- inodes = timeout(5)(os.statvfs)(mountpoint)
+ inodes = timeout(self._timeout)(os.statvfs)(mountpoint)
239
except TimeoutException:
240
- self.log.warning(u'Timeout while retrieving the disk usage of `%s` mountpoint. Skipping...', mountpoint)
+ self.log.warning(
241
+ u'Timeout after %d seconds while retrieving the disk usage of `%s` mountpoint. '
242
+ u'You might want to change the timeout length in the settings.',
243
+ self._timeout,
244
+ mountpoint,
245
+ )
246
return metrics
247
except Exception as e:
248
self.log.warning('Unable to get disk metrics for %s: %s', mountpoint, e)
0 commit comments