glensc / nagios-plugin-check_raid

Nagios/Icinga/Sensu plugin to check current server's RAID status ⛺
143 stars 84 forks source link

Nagios3 server reports check_raid UNKNOWN - No active plugins (No RAID found) #144

Closed ghost closed 7 years ago

ghost commented 8 years ago

I've been using 4.0.2 with an Ubuntu VM as my Nagios3 Server with the NRPE plugin and a Fedora machine (where 4.0.2 is installed in /usr/lib64/nagios/plugins) as the remote host with the NRPE server and Nagios plugins installed. The RAID controller is LSI MegaRAID SAS 9271-4i and I'm using MegaCLI located in my /opt/MegaRAID/MegaCLI folder.

On my Fedora machine, running check_raid.pl works fine giving: OK: megacli:[Volumes(1): DISK0.0:Optimal,WriteCache:DISABLED; Devices(2): 05,04=Online] but on the nagios webpage on my Ubuntu VM the check_raid service’s status shows up as: NRPE: Unable to read output OR check_raid UNKNOWN – No active plugins (No RAID found)

I've attempted to remedy the issue through modifying the sudoer file (in /etc/sudoers) and changing individual file permissions, but nothing seems to fix the issue.

Image running check_raid.pl locally on Fedora machine: capture 2

Image running check_raid.pl remotely with the NRPE plugin from Ubuntu VM : capture

I've looked through similar closed issues on the repo but have yet to find a solution.

ghost commented 8 years ago

My somewhat novice status with Linux was probably the real issue here, the solution is to disable SELinux in /etc/selinux/config and reboot the machine.

glensc commented 8 years ago

Run the plugin as same user your nagios nrpe is running, not root!

sudo -H -u nagios /full/path/to/script.pl -d

it should give you glues what commands or files it is attempting to execute and what fails.

and can't help you if you just said that you did something with sudo, but no actual changes posted here neither the output run of the command(s).

glensc commented 7 years ago

Unable to solve; User gone; No feedback;

Probably solved by himself and did not bothered to report back.