linux-nrpe-agent.tar.gz installation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

linux-nrpe-agent.tar.gz installation

Post by ranjitw »

Hi All,

We want linux agent to be installed on different path like /produtils/nagios intend of /usr/local/nagios is it possible ?

If yes can anyone please suggest the steps to be followed? We are planning for a bulk deployment on a non-standard path .
Regards,
Ranjit W
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: linux-nrpe-agent.tar.gz installation

Post by jdalrymple »

The most important change that needs to be made to the package is you have to add --prefix=/my/path to the configure script.

There are a few other things to deal with

1) A-Subcomponents has a mkdir section that needs to be modified to suit
2) If you want your plugins in a different location that will also need to be adjusted in the install script for configure

Making these changes then rebundling everything should work for you though, it did for me.
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: linux-nrpe-agent.tar.gz installation

Post by ranjitw »

Hi jdalrymple ,

Can you please let me know the configure script name please in which I need to add --prefix ?
Please also explain more on point 2 "If you want your plugins in a different location that will also need to be adjusted in the install script for configure"

which file your referring to.

Can you please share your files for reference ?
Regards,
Ranjit W
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: linux-nrpe-agent.tar.gz installation

Post by tgriep »

If you extracted the agent in the /tmp folder, you will have to edit this file and change the path to where you want to install the NRPE agent and the plugins.

Code: Select all

/tmp/linux-nrpe-agent/A-subcomponents
This script creates the folders and sets the permissions for the Agent and the Plugins.
Then in this folder

Code: Select all

/tmp/linux-nrpe-agent/subcomponents
and all of the sub folders, you will have to change all of the paths to reflect where you want to install to.
The scripts that need to be edited is called install and post-install
If the script has a configure line like below

Code: Select all

 ./configure --enable-command-args --libexecdir=/usr/local/nagios/libexec $libssldir
You will need to add the following to it so it will compile and copy the software to the correct folder.

Code: Select all

--prefix=/my/path 
Try it out and see how it works for you.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: linux-nrpe-agent.tar.gz installation

Post by rajasegar »

tgriep wrote:If you extracted the agent in the /tmp folder, you will have to edit this file and change the path to where you want to install the NRPE agent and the plugins.

Code: Select all

/tmp/linux-nrpe-agent/A-subcomponents
This script creates the folders and sets the permissions for the Agent and the Plugins.
Then in this folder

Code: Select all

/tmp/linux-nrpe-agent/subcomponents
and all of the sub folders, you will have to change all of the paths to reflect where you want to install to.
The scripts that need to be edited is called install and post-install
If the script has a configure line like below

Code: Select all

 ./configure --enable-command-args --libexecdir=/usr/local/nagios/libexec $libssldir
You will need to add the following to it so it will compile and copy the software to the correct folder.

Code: Select all

--prefix=/my/path 
Try it out and see how it works for you.
Are you proposing the agents be compiled in the client machines?
No compiler is allowed in production environments.

My suggestion
1) Compile in test environment and let it do the defaults and produce all output in /usr/local/nagios
2) cd /usr/local/; tar cvfz /tmp/myagent.tar.gz ./nagios
3) extract myagent.tar.gz to any target directory in client machine
4) modify your nrpe.cfg and agent startup script to reflect the new path.

This is all you need to do.
Occasionally you might need to install some rpm (example sysstat-7.0.2-12.el5.x86_64.rpm) in client machine due to missing dependency.
Last edited by rajasegar on Tue Nov 03, 2015 6:06 pm, edited 1 time in total.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: linux-nrpe-agent.tar.gz installation

Post by ranjitw »

Hi,

I will try this options and come back .
Regards,
Ranjit W
User avatar
tgriep
Madmin
Posts: 9179
Joined: Thu Oct 30, 2014 9:02 am

Re: linux-nrpe-agent.tar.gz installation

Post by tgriep »

Thanks rajasegar for posting.
There are many ways to do this.
Be sure to check out our Knowledgebase for helpful articles and solutions!
ranjitw
Posts: 175
Joined: Tue Sep 01, 2015 1:52 am

Re: linux-nrpe-agent.tar.gz installation

Post by ranjitw »

As we are installation linux agent on different FS like /produtils/nagios intend of /usr/local/nagios we need following details :

1) What logs are generated from agent ?
2) What size approximately is needed for dedicated FS? eg:/produtils/nagios
3) Which configuration files should be modified to specify logs directory?
Regards,
Ranjit W
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: linux-nrpe-agent.tar.gz installation

Post by jdalrymple »

1) The daemon logs to syslog, disabled by default.
2) nagios-plugins is 6.7 MB installed, nrpe is 143KB, check_nrpe is 76KB, nrpe.cfg is about 8KB - total a bit over 7 MB. I would leave extra space for your nrpe.cfg to grow and for custom plugins.
3) Your syslog configuration is where you'll have to modify in what file logs are placed. As mentioned, logging for nrpe is disabled by default. You may find some custom plugins will leave state files - these usually land in /tmp, however none of the default plugins do this.
Locked