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

add CpuLoadCheck #34

Merged
merged 2 commits into from
Sep 29, 2023
Merged

add CpuLoadCheck #34

merged 2 commits into from
Sep 29, 2023

Conversation

david-d-h
Copy link
Contributor

This PR adds the CpuLoadCheck, it can be configured like this

OK::checks([
    CpuLoadCheck::config()
        ->setMaxLoad(100, 95, 90),
]);

This check uses sys_getloadavg, this tries to get the system cpu load for the past 1, 5 and 15 minutes. It is configured in the same manner, the arguments correspond to 1 minute, 5 minute and 15 minute respectively.

You can also only configure for example the 15 minute long target

CpuLoadCheck::config()
    ->setMaxLoad(long: 90),

@david-d-h david-d-h added the enhancement New feature or request label Sep 28, 2023
@david-d-h david-d-h self-assigned this Sep 28, 2023
@markvaneijk
Copy link
Member

Awesome!

@markvaneijk markvaneijk merged commit eea71fd into main Sep 29, 2023
5 checks passed
@markvaneijk markvaneijk deleted the feature/cpu-load-check branch September 29, 2023 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants