Skip to content

Remove clear variable from disk CheckCommand #10531

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RincewindsHat
Copy link
Member

This commit removes the -C parameter from the disk CheckCommand since there is no possible way to use it in any functional capacity.

-C (or --clear) would reset the thresholds given previously to allow for setting different thresholds for following filesystmes. As an example:

check_disk -w 50% -c 5% -p / -C -w 1%  -p /home

would only set the warning threshold for /home.

Since there is no way to use it reasonaly with the Icinga 2 implementation of check_disk (since thresholds can only be given once and the order is undefined), the clear flag has no worth here.

My suggestion is to remove it avoid suggesting that it might be used, but I left it as a comment in the ITL to prevent the next person from "adding a missing parameter".

This commit removes the -C parameter from the disk CheckCommand
since there is no possible way to use it in any functional capacity.

-C (or --clear) would reset the thresholds given previously
to allow for setting different thresholds for following filesystmes.
As an example:

check_disk -w 50% -c 5% -p / -C -w 1%  -p /home

would only set the warning threshold for /home.

Since there is no way to use it reasonaly with the Icinga 2
implementation of check_disk (since thresholds can only be
given once and the order is undefined), the clear flag
has no worth here.

My suggestion is to remove it avoid suggesting that it might
be used, but I left it as a comment in the ITL to prevent
the next person from "adding a missing parameter".
@cla-bot cla-bot bot added the cla/signed label Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant