[check raid error] with check_raid.pl

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

[check raid error] with check_raid.pl

Postby mrvh » Mon May 15, 2017 11:59 pm

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
mrvh
 
Posts: 11
Joined: Wed May 03, 2017 3:23 am

Re: [check raid error] with check_raid.pl

Postby avandemore » Tue May 16, 2017 10:55 am

Does the nrpe user have the correct permissions to run the plugin?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
avandemore
Support Tech
 
Posts: 1389
Joined: Tue Sep 27, 2016 4:57 pm
Location: Nagios Enterprises

Re: [check raid error] with check_raid.pl

Postby mrvh » Wed May 17, 2017 8:49 pm

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

Postby mrvh » Wed May 17, 2017 10:28 pm

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.
mrvh
 
Posts: 11
Joined: Wed May 03, 2017 3:23 am

Re: [check raid error] with check_raid.pl

Postby tgriep » Thu May 18, 2017 12:43 pm

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!
User avatar
tgriep
Madmin
 
Posts: 5002
Joined: Thu Oct 30, 2014 9:02 am


Return to Nagios Core

Who is online

Users browsing this forum: Google [Bot] and 19 guests