-
Notifications
You must be signed in to change notification settings - Fork 85
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
No remote servers RAID status: check_raid UNKNOWN #194
Comments
sorry for your loss! regarding installing and modules: you should be using released versions: these have all dependencies embedded in this way of installing is described in readme: installing dependencies for development mode is indeed, not really documented: if your nagios server does not execute properly, you likely have not setup sudo rules, also documented in readme: |
regarding remote execution, does the nrpe answer to the command?
|
also, please link to that "very old reply" |
Hi glensc, Thank you for your kind reply. Appreciated! I did follow the install tutorial, as you described in your first post. I downloaded the .zip file and unzipped it to the server. Anyways, I downloaded check_raid.pl (from the link you gave) the I re-did it once again. And ran on the remote server:
So the rules are correctly? As they didn't change. So that's not it imho. I also did it on the Nagios server (the result was a bit different though):
The Nagios server is running on CentoS 7.6 with latest updates. I entered the command once again to check the remote server: But executing the command on the server itself, it's working great. In regard to the very old reply: I had to dig for the old installation post, but I found it here: #147 I have no clue why it's going wrong though. Also I ran: rpm -ivh https://github.com/glensc/nagios-plugin-check_raid/releases/download/4.0.9/nagios-
Probably shouldn't be using it. But I have the latest Module::Pluggable & Monitoring::Plugin Perl modules? See below:
So really no clue...? |
Update! Made some progress. For some reason check_raid was named check_raid.sh on the remote server.
Still not the result it should display, but at least it's showing something now. //edit Selinux is disabled on both servers by the way. |
unclear from the messages, does check_raid.pl (the all-in-one version from downloads) work for you:
you should troubleshoot in that order |
I just redid everything once again. Also making sure I am using the correct version: 4.0.9 (also tried the dev version, but same result). 1 On remote server as root: OK: megacli:[Volumes(1): DISK0.0:Optimal; Devices(2): 02,01=Online] 2a On remote server: su nagios results in: This account is currently not available. 2b Enabled the account, logged in as nagios and ran the command: OK: megacli:[Volumes(1): DISK0.0:Optimal; Devices(2): 02,01=Online] 3 I don't know how to test this? I don't have the command check_nrpe on the remote server? I installed several other plugins including "Check Linux Stats", but all of them are working correctly? Very strange. :( |
I am gonna reboot both servers. Doubt it will help, but I am going crazy here. Trying now everything. :( |
Running the command through SSH from the Nagios server to the remote server also works: Output of /etc/sudoers.d/check_raid on the remote server:
|
I am gonna redo it again on a different server. Doubt it will help. But worth a shot. |
regarding testing over nrpe: you already setup nrpe: so, run the nrpe command: |
Okay... I installed your script on a completely new server. But exactly the same issue.
On the remote server:
From the Nagios server:
Yes nrpe is installed on the remote server, however there is no "check_nrpe" command. And I don't know how to run "nrpe" by itself on the remote server. Using the command "nrpe -V" gives:
On the remote server. And I already have run the command a ton of times on the Nagios server, but no luck. That's why I created this ticket obviously:
So I have no idea on how to run check_nrpe on the remote server? Anyways, I will copy it over and try to run it that way. Will report back asap. |
Copied over check_nrpe and run the command locally on the remote server with using check_nrpe:
:( Also tried sudo. Same result. |
given that you get back megacli detected but incompletely, I guess there's some sudo execution problems. did you look logs in
you can run and try individual commands as root and nagios user. random guess is that and this time paste full commands and output to understand what user you are running. i.e |
Sorry for the late reply; I was ill the past few days. Anyways, in the end I got it fixed. The issue was that I needed to do the following on the remote server:
I don't recall where I read it, it was on some website somwhere. But in the end these changes made it work for me finally. Regards |
so, this contains information that you did not provide, even I asked repeatedly:
given your previous you can add
that should make it work without the unknown changes you don't have even origin link. if that's the case (user nrpe not handled), please include defails how you got your nrpe server installed. so could include that information to changelog. |
Hi glensc!
Sorry if my question is really stupid / silly. I am new to Nagios and I have to set this up again from scratch as our in house technician (and close friend) recently passed away. I managed to get most things working, however I have some issues with your script.
I had some issues about missing certail Perl modules, but eventually managed to get those installed and working.
If I run the command locally on the monitored server, your script is working perfectly.
For example:
[Remote.Server]# sh /usr/lib64/nagios/plugins/check_raid.sh
OK: megacli:[Volumes(1): DISK0.0:Optimal; Devices(2): 01,02=Online]
However on the Nagios Core (4.4.3) server I don't get any output:
check_raid UNKNOWN - No active plugins (No RAID found)
My guess is that it's looking on the Nagios Core server locally. Which does not have a RAID config, hence the "No RAID found" message obviously.
I have looked at your check_raid.cfg example and applied the following (on the Nagios Core server):
/usr/local/nagios/etc/objects/commands.cfg
/usr/local/nagios/etc/objects/vz_nodes.cfg
/usr/local/nagios/etc/nrpe.cfg
As you can see, I did actually try a lot of things, hence the hashtags. But none of it works.
Now I really have no clue what I am doing wrong. Maybe I did (probably) something wrong. But I have no clue where!
As mentioned above, running the command locally on the server which needs to be checked works without issues. But the issue is, is that it's not working correctly from the Nagios Core server.
Your plugin is located on the remote server in the folder: /usr/lib64/nagios/plugins/
And on the Nagios Core Server it's located in folder: /usr/local/nagios/libexec/
Sidenote; since I was missing quite a few Perl modules, I used the method you described in a very old reply here. I used the following:
Is this all really needed? Isn't there a better way?
Thank you kindly in advance! I hope you can shed your light on this. Probably it's something dumb/simple. Sorry.
Regards,
HHawk
The text was updated successfully, but these errors were encountered: