Closed itinance closed 9 months ago
the option threshold
is in Bytes, not GB. If you want 2GB as your threshold, try this:
@HealthCheck()
check() {
return this.health.check([
() =>
this.disk.checkStorage('storage', {
path: '/',
threshold: 2 * 1024 * 1024 * 1024, // 2GB
}),
]);
}
Is there an existing issue for this?
Current behavior
The DiskHealthIndicator always reports "Used disk storage exceeded the set threshold", no matter which values will be applied and no matter how free or full the disk actually is.
Minimum reproduction code
Steps to reproduce
just implement the
check
-method using DiskHealthIndicatorExpected behavior
it would not report "storage exceeds" if there is enough space left according to the
threshold
orthresholdPercentage
valuePackage version
10.2.0
NestJS version
9.0.0
Node.js version
18.17.1
In which operating systems have you tested?
Other
A debug option would be helpful to identify which values have been detected.