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 check to see if we have root. Required for sas3ircu binary to work. #52

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

Conversation

rudybroersma
Copy link

I would like to request this merge to implement a check for root access with this wrapper script.
We use the script solo (as a standalone check) and it give misleading output without root access:

Without root:
$ /usr/bin/check_sas3ircu
-- Controller informations --
-- ID | Model

-- Arrays informations --
-- ID | Type | Size | Status

-- Disks informations
-- ID | Model | Status

$ /usr/bin/check_sas3ircu --nagios
RAID OK - Arrays: OK:0 Bad:0 - Disks: OK:0 Bad:0

$ echo $?
0

As you can see, no controller details, but the check returns exit 0. Also, Arrays and disks are both 0. A quick and easy fix is to add a check for root access.

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.

1 participant