Skip to content

mdstat: Check if a certain amount of spares are present #185

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

Merged
merged 5 commits into from
Dec 4, 2018

Conversation

chschenk
Copy link
Contributor

@chschenk chschenk commented Jun 20, 2018

This pull request adds a plugin option to check if a certain amount of spares in an md array are present:

Example:
check_raid --plugin-option=mdstat_spare_count="md126:3,md127:2"

checks that md126 has at least 3 spares and that md127 has at least 2 spares

@glensc
Copy link
Owner

glensc commented Nov 28, 2018

can you add some tests to the new code paths?

@chschenk
Copy link
Contributor Author

chschenk commented Dec 3, 2018

I have added some test data and some tests. What do you think on this PR? Any chance to get this included?

@glensc
Copy link
Owner

glensc commented Dec 4, 2018

looks like my previous comment was never posted

the tests pass, so looks good.

ideally i'd not make the methods even longer, but use subroutines. but the cleanup can be done later as well.

@glensc glensc merged commit 7d44edd into glensc:master Dec 4, 2018
glensc added a commit that referenced this pull request Dec 4, 2018
@glensc
Copy link
Owner

glensc commented Dec 4, 2018

I wonder how would users find the options/features like this?

Do you mind writing some pod documentation to specific plugin header?

this would be first plugin having such doc, so you can be creative ;)

@glensc
Copy link
Owner

glensc commented Dec 4, 2018

you can grab new version from snapshot build

  • check_raid-4.0.8-32-g3fa8e16.pl
  • nagios-plugin-check-raid_4.0.8-0.32.g3fa8e16_all.deb
  • nagios-plugin-check_raid-4.0.8-0.32.g3fa8e16.noarch.rpm

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.

2 participants