[check raid error] with check_raid.pl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
mrvh
Posts: 11
Joined: Wed May 03, 2017 3:23 am

[check raid error] with check_raid.pl

Post by mrvh »

Hi all,

I check raid On itself (server linux) with plugin check_raid.pl success:

link download plugin: https://github.com/glensc/nagios-plugin-check_raid

Code: Select all

 ./check_raid.pl -p megacli
WARNING: megacli:[Volumes(1): RAID5:Optimal,WriteCache:DISABLED; Devices(8): 04,05,06,07,08,09,10,11=Online]


but i check raid on server nagios meet error:

Code: Select all

./check_nrpe -H 172.16.0.77 -c check_raid.pl
CRITICAL: megacli:[Volumes(0): ; Devices(0): ]
help me, please. Thank
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: [check raid error] with check_raid.pl

Post by avandemore »

Does the nrpe user have the correct permissions to run the plugin?
Previous Nagios employee
mrvh
Posts: 11
Joined: Wed May 03, 2017 3:23 am

Re: [check raid error] with check_raid.pl

Post by mrvh »

avandemore wrote:Does the nrpe user have the correct permissions to run the plugin?
Hi avandemore,

I'm "chown" plugin nrpe :

Code: Select all

-rwxr-xr-x 1 nagios nagios 135376 Apr 20 16:29 check_nrpe
I tried "chown" to "root" but still error.

Thank.
mrvh
Posts: 11
Joined: Wed May 03, 2017 3:23 am

Re: [check raid error] with check_raid.pl

Post by mrvh »

avandemore wrote:Does the nrpe user have the correct permissions to run the plugin?
Hi avandemore,

I'm check chown npre on server monitoring raid and it's work.

Thank.
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: [check raid error] with check_raid.pl

Post by tgriep »

I took a look at the web site you downloaded the plugin from and it says that is may require to be setup in the /etc/sudoers file so it can run as root.
In the plugin is in the /usr/local/nagios/libexec folder, you would have to add the following line to the /etc/sudoers file on the remote server.

Code: Select all

nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_raid.pl
The the command definition in the nrpe.cfg file would have to be edited like the example below and then the NRPE agent would have to be restarted for the changes to take affect.

Code: Select all

command[check_raid.pl]=sudo /usr/local/nagios/libexec/check_raid.pl -p megacli
Try that out and see if that works for you.

If not, login to the remote server as root, change to the folder where the plugin is installed and run the following commands. Post the output.

Code: Select all

su nagios
./check_raid.pl -p megacli
That should tell you is the nagios used can run the plugin as that is the user account the NRPE Agent runs the commands as.
If it fails, post your /etc/sudoers file and the nrpe.cfg file from the remote server.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked