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

Change mode execution to allow performing multiple checks sequentually. #46

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

Conversation

hamapj
Copy link

@hamapj hamapj commented Jan 17, 2024

With this PR I changed the handling of the --mode parameter to allow execution of multiple --mode parameters being provided.
If CPU and memory of a node shall be monitored at once, simply pass "-m cpu -m memory" along with the other usual parameters.
This will return both outputs as if only one of the parameters at once and then be concatenated. The exit code for the check_pve.py will be the highest from all the checks which were performed.

Additionally I added modes which allow to monitor all lxc's/vm's regardless of the host they are running on. These modes are calles -m all_lxcs and -m all_vms.

Furthermore I added a new parameter --checks which allows to set additional parameters which can be used to customize already given functionality. To be precise, I added the possibility to provide "vm_storage" as an argument to --checks. With this argument, the -m vm, vm_status, all_lxcs and all_vms mode will additionally monitor the disk usage of the lxc/vm.

Currently update of the documentation is missing in this PR. I wanted to wait with that until I get some feedback about the implementation and further suggestions.

…y. Added additional modes which monitor all lxc's/vm's regardless of there host. Added parameter to perform additional disk check for lxc/vm.
@nbuchwitz
Copy link
Owner

Thanks for this contribution. Please split the different functional changes into separate commits. Eg. one for combined checks and one for new check modes for all resources. The vm storage was added with #47 to the checks perfdata, so probably the --checks is no longer needed?

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

Successfully merging this pull request may close these issues.

None yet

2 participants