NRPE Error for ARM based architectures

Found something amiss in NEMS? Confirm first that you are running the latest version, and then post your bug report here.
Post Reply
User avatar
Zerant
Junior Member
Posts: 14
Joined: Wed Jan 02, 2019 11:30 am

NRPE Error for ARM based architectures

Post by Zerant »

Hi,

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:

Code: Select all

(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.

Code: Select all

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

Best,
Zerant
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NRPE Error for ARM based architectures

Post by Robbie Ferguson »

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:

Code: Select all

  # 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
      fi
    fi

    # 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~
    fi

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

    # 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
    fi

    # 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.

Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Zerant
Junior Member
Posts: 14
Joined: Wed Jan 02, 2019 11:30 am

RE: NRPE Error for ARM based architectures

Post by Zerant »

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.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NRPE Error for ARM based architectures

Post by Robbie Ferguson »

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.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Zerant
Junior Member
Posts: 14
Joined: Wed Jan 02, 2019 11:30 am

RE: NRPE Error for ARM based architectures

Post by Zerant »

Sure I am fine for now, I am checking over ssh for the moment ;)
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NRPE Error for ARM based architectures

Post by Robbie Ferguson »

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.
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NRPE Error for ARM based architectures

Post by Robbie Ferguson »

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!
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
User avatar
Zerant
Junior Member
Posts: 14
Joined: Wed Jan 02, 2019 11:30 am

RE: NRPE Error for ARM based architectures

Post by Zerant »

I don't use Windows on any server.

But I have this issue on Linux, if I try to run a check via NRPE.
User avatar
Robbie Ferguson
Posting Freak
Posts: 835
Joined: Wed Mar 07, 2012 3:23 pm
Location: Ontario, Canada
Contact:

RE: NRPE Error for ARM based architectures

Post by Robbie Ferguson »

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.

Thanks,
Robbie
Robbie Ferguson // The Bald Nerd

Did I help you out? Appreciate what I do? Please consider saying thanks:
Post Reply