Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check-disk-usage always shows the non-magic usage under ‘OK’ #33

Open
Debilski opened this issue Mar 8, 2016 · 2 comments
Open

Comments

@Debilski
Copy link

Debilski commented Mar 8, 2016

When ok is returned, the return text does not take the magic number into account and uses config[:bwarn]. This is especially confusing, when only one mount is being checked:

$ /opt/sensu/embedded/bin/check-disk-usage.rb -I /extra -m 1
CheckDisk CRITICAL: /extra 96.07% bytes usage (386 GiB/402 GiB)
$ /opt/sensu/embedded/bin/check-disk-usage.rb -I /extra -m 0.6
CheckDisk OK: All disk usage under 85% and inode usage under 85%

Obviously, the disk usage is over 85%.

@bgupta
Copy link

bgupta commented Sep 27, 2016

I'll add that we are running into this issue as well. This is very confusing, especially when debugging. [EDIT] - This is also confusing to the oncall engineers who get the OK alert.

@exeral
Copy link

exeral commented Mar 21, 2018

adding this piece of code puts "Magic threshold for #{line.mount_point} - warn:#{bwarn}%, crit: #{bcrit}%"
into the check_mount() function gives you the info.
but this is quite a hack and probably not the expected output of a check.
I wonder what's the best way to include all the usefull information in one line.

Magic threshold for / - warn:80%, crit: 90%
Magic threshold for /boot - warn:80%, crit: 90%
Magic threshold for /var - warn:92.14777308396799%, crit: 96.073886541984%
CheckDisk OK: All disk usage under 80% and inode usage under 85%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants