Category5.TV Community Forum

Full Version: NRPE Error for ARM based architectures
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

while fiddeling around with "check_nrpe" it seams that I found a bug.

While monitoring my RPis with NEMS everything worked fine, but then I added some non RPi based server to NEMS and got an error for using "check_nrpe".

All systems are configured the same.

For a normal "check_disk" via nrpe on my RPis I am getting the result I expect.
For my other Linux based systems I am getting following error:
(No output on stdout) stderr: *** Error in `/usr/local/nagios/libexec/check_nrpe': corrupted size vs. prev_size: 0x01376c60 ***

OS: Ubuntu 14.04.5 LTS

This is the "check_disk" command.

command[check_disk]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /

It seams that it is a known bug/error when compiling nagios on ARM architectures:

Link to the Nagios GitHub bug

Try this and let me know. This is from NEMS 1.5, but I don't see why it wouldn't work on older versions too:

 # BEGIN Fix NRPE and check_wmi_plus

   # Remove NRPE plugin if it is installed in the wrong folder
   # Check if it's a directory (not symlink) first
   if [[ -d /usr/lib/nagios/plugins ]]; then
     if [[ -e /usr/lib/nagios/plugins/check_nrpe ]]; then
       apt -y --purge remove nagios-nrpe-plugin

   # If the plugins folder still exists, rename it (would rather delete)
   if [[ -d /usr/lib/nagios/plugins ]]; then
     mv /usr/lib/nagios/plugins /usr/lib/nagios/plugins~

   # Create the base folder if it doesn't exist
   if [[ ! -d /usr/lib/nagios ]]; then
     mkdir /usr/lib/nagios

   # If the plugins symlink doesn't already exist, create it
   # This is needed for check_wmi_plus. While I could patch it, I don't want to have to maintain it TBH
   if [[ ! -e /usr/lib/nagios/plugins ]]; then
     ln -s /usr/local/nagios/libexec /usr/lib/nagios/plugins

   # Reinstall check_nrpe, which will now pop into the correct folder due to the symlink
   apt install -y nagios-nrpe-plugin

 # END Fix NRPE and check_wmi_plus

If that works, I'll roll it out to NEMS 1.4.1.

After testing your fix I have still the same issue.

I don't have much time to fiddle around myself, so sorry for the late response.
Darn. I was hoping that'd do it. Since you're the only one reporting the issue, are you okay to wait for NEMS 1.5 (as I don't believe the issue exists there - NRPE and other Nagios plugins are completely redone in 1.5). And if it does exist on NEMS 1.5, at least then I can write a backward compatible patch... but I'd rather not work on a patch for 1.4.1 right now while I'm working hard to release 1.5, if that works for you.
Sure I am fine for now, I am checking over ssh for the moment Wink
Alright great! NEMS Linux 1.5 will be released on the ODROID XU4 first, followed by the Raspberry Pi platform a week or two later.
I just reviewed the thread you linked to in your original report above, which is entirely unrelated to the issue I was correcting.

Are you sure you did the setup on your Windows machines as per the NEMS docs? From the thread you linked to, those people have misconfigured their nsclient++. I'd be very surprised if the config detailed in our documentation results in the same issue.

Lemme know - thanks!
I don't use Windows on any server.

But I have this issue on Linux, if I try to run a check via NRPE.
Alright, well I think we'll have to wait until you're running NEMS 1.5 since 1.4 is about to enter Old Stable status and soon will be Legacy. I'd like you to retry on NEMS 1.5 since NRPE was completely re-written for NEMS 1.5, and see if you are still experiencing the issue.

It's quite probably a version mis-match, which we can look into once you're on the latest version of NEMS. As you already know, I'm working hard to release it. It'll be soon.