Page 1 of 1

[check raid error] with check_raid.pl

Posted: Mon May 15, 2017 11:59 pm
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

Re: [check raid error] with check_raid.pl

Posted: Tue May 16, 2017 10:55 am
by avandemore
Does the nrpe user have the correct permissions to run the plugin?

Re: [check raid error] with check_raid.pl

Posted: Wed May 17, 2017 8:49 pm
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.

Re: [check raid error] with check_raid.pl

Posted: Wed May 17, 2017 10:28 pm
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.

Re: [check raid error] with check_raid.pl

Posted: Thu May 18, 2017 12:43 pm
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.