NRPE on Amazon Linux

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.

Re: NRPE on Amazon Linux

Postby cybergene » Fri Mar 17, 2017 8:12 am

I tried both V3 and V2.15 on the remote host. But it works now with V2.15.

On Nagios Core
Code: Select all
/usr/local/nagios/libexec/check_nrpe -V

NRPE Plugin for Nagios
Copyright (c) 1999-2008 Ethan Galstad (nagios@nagios.org)
Version: 3.0.1
Last Modified: 09-08-2016
License: GPL v2 with exemptions (-l for more info)
SSL/TLS Available: OpenSSL 0.9.6 or higher required



I have looked into this more and it seems to be an issue with AWS Linux AMI. This instance has an old Linux and kernel, which is not compatible with NRPE version 3.x. The installation failed and nrpe config files weren't working. It didn't recognize nrpe as a and installed service on the system.

So, I installed NRPE v2.15 and I forced version 2 packet only. Now it works and doesn't generate any errors.

I'm not sure if there is any other workaround or fix for the NRPE version 3.x on Amazon Linux but this seems to work for now...
cybergene
 
Posts: 15
Joined: Wed Aug 10, 2016 7:38 am
Location: Ottawa, Ontario, Canada

Re: NRPE on Amazon Linux

Postby tgriep » Fri Mar 17, 2017 11:30 am

When you compiled the version 3 of the NRPE Agent on the remote host, did you receive any errors?
How old is that system, what OS and release is it running?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 4313
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE on Amazon Linux

Postby cybergene » Fri Mar 17, 2017 12:37 pm

tgriep wrote:When you compiled the version 3 of the NRPE Agent on the remote host, did you receive any errors?
How old is that system, what OS and release is it running?


No, I didn't get any errors. I wasn't able to start nrpe at all.

This is what I found:

Code: Select all
1)NRPE [b]wasn't [/b]listening on TCP port 5666
2)NRPE [b]wasn't [/b]able to run or start
3)If you run: sudo service -status-all  ---> NRPE is not registered as a service
4)If you run service nrpe start, you get---> nrpe: unrecognized service
5)nrpe.conf exists under /etc/init/nrpe.conf, but unable to start nrpe


Result:

Code: Select all
1)Amazon LInux uses an old version of upstart that, for some reason, doesn’t like the nrpe.conf file
2)The log files complain about:
   -[i]/etc/init.conf: unable to load configuration: No such file or directory[/i]
   -[i]/etc/init/nrpe.conf:10 Illegal oom adjustment, expected -16 to 15 or never[/i]




Here ar the specs of the Amazon Linux AMI https://aws.amazon.com/amazon-linux-ami/2015.03-release-notes/

Thanks!
cybergene
 
Posts: 15
Joined: Wed Aug 10, 2016 7:38 am
Location: Ottawa, Ontario, Canada

Re: NRPE on Amazon Linux

Postby tgriep » Fri Mar 17, 2017 1:56 pm

Can that system run applications using xinetd?

If so, you can use this config to start nrpe using that.

Code: Select all
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
        flags           = REUSE
        socket_type     = stream   
        port            = 5666   
        wait            = no
        user            = nagios
        group           = nagios
        server          = /usr/local/nagios/bin/nrpe
        server_args     = -c /usr/local/nagios/etc/nrpe.cfg --inetd
        log_on_failure  += USERID
        disable         = no
#       only_from       = 127.0.0.1
}
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 4313
Joined: Thu Oct 30, 2014 9:02 am

Re: NRPE on Amazon Linux

Postby cybergene » Mon Mar 20, 2017 2:39 pm

I have a new environment coming up with AWS Linux. I will test it when we have it ready and will update if this works with xinetd.
cybergene
 
Posts: 15
Joined: Wed Aug 10, 2016 7:38 am
Location: Ottawa, Ontario, Canada

Re: NRPE on Amazon Linux

Postby tgriep » Mon Mar 20, 2017 4:38 pm

OK, keep us posted.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
tgriep
Madmin
 
Posts: 4313
Joined: Thu Oct 30, 2014 9:02 am

Previous

Return to Nagios Core

Who is online

Users browsing this forum: Yahoo [Bot] and 23 guests