Page 1 of 1
Install multiple instance of NRPE agent
Posted: Tue Mar 05, 2019 2:18 pm
by anilgupta
Team,
We have a set of servers being monitored by Nagios Core server using NRPE agents. This Nagios Core is owned by local system administrators.
As Enterprise Monitoring initiative, we need to monitor the same set of servers. We do not want to disturb their monitoring, these servers are so critical.
Questions:
1) How to install second instance of agent running on different port (let's say, 4666). While running agent installation, it doesn't give option to specify the port number.
2) Once the Agent running on PORT 4666, how should it be monitored? because Nagios starts communication on default agent port 5666.
Re: Install multiple instance of NRPE agent
Posted: Tue Mar 05, 2019 4:14 pm
by scottwilkerson
when running the configure script you are going to want to add the arg
But this aside, there is going to be a ton of other items that are going to need to changed as otherwise you are going to clobber the existing config, binary, service file, etc.
Instead of this, may I propose you just use the existing nrpe, however in the nrpe.cfg you just add the following which will point th the commands you want to use for the seperate commands
then in this directory make a file with your commands
custom_commands.cfg
Code: Select all
command[check_procs_custom]=/usr/local/nagios/libexec/check_procs $ARG1$
The biggest thing to make sure of is that you do not make identical command names
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 06, 2019 9:07 am
by anilgupta
Hello scottwilkerson,
Thanks for your response.
I liked the proposed idea. In order to compare the both idea, I need clarification on below.
1) with the given instructions, there will be single instance of NRPE agent running on port 5666. Is my understanding correct?
2) We will just be creating another directory where we will define our command. Is this correct?
Regarding my original question, you said that we can define the port with --with-nrpe-port=4666. How can we specify the installation location so that it will not mess up the existing instance.
Let me know if any clarification needed.
Thanks,
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 06, 2019 9:47 am
by scottwilkerson
anilgupta wrote:I liked the proposed idea. In order to compare the both idea, I need clarification on below.
1) with the given instructions, there will be single instance of NRPE agent running on port 5666. Is my understanding correct?
yes
anilgupta wrote:2) We will just be creating another directory where we will define our command. Is this correct?
yes
anilgupta wrote:Regarding my original question, you said that we can define the port with --with-nrpe-port=4666. How can we specify the installation location so that it will not mess up the existing instance.
there are a ton of different directories you would need to change. You can see the available option by running the following on the nrpe configure file
Even given this, there is also the need to actually have a different service name and I'm not 100% sure that is even a configurable option.
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 13, 2019 1:16 pm
by anilgupta
Hi, I tried to install the nrpe agent under different location and new PORT number.
I had to update only TWO files: nrpe2.cfg and common.cfg.
After the change the new agent is up and running and serving the request from Naigos.
But I am concerned as what other files/directories needs to be updated as you stated below.
Code: Select all
there are a ton of different directories you would need to change
We would like to discuss this in detail. Can we please have phone conversation on this?
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 13, 2019 1:20 pm
by scottwilkerson
anilgupta wrote:But I am concerned as what other files/directories needs to be updated as you stated below.
I was mainly referring the the config file locations you were mentioning (and afraid that if you did it wrong it would overwrite your existing configs) and the fact that a typical installation sets up a service named nrpe which would be in conflict (because it could overwrite your existing service) unless you setup a separate service name.
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 13, 2019 3:17 pm
by anilgupta
thanks for the response.
I understand the risk of conflicting service name.
Please confirm that renaming service name along with changing the TWO files (nrpe.cfg and common.cfg) is good enough to run the instance under different location. And, literally we do not need to update/modify tones of files.
Re: Install multiple instance of NRPE agent
Posted: Wed Mar 13, 2019 3:27 pm
by scottwilkerson
anilgupta wrote:thanks for the response.
I understand the risk of conflicting service name.
Please confirm that renaming service name along with changing the TWO files (nrpe.cfg and common.cfg) is good enough to run the instance under different location. And, literally we do not need to update/modify tones of files.
That sounds right to me.
Re: Install multiple instance of NRPE agent
Posted: Thu Mar 14, 2019 3:15 pm
by anilgupta
Thanks for the response scottwilkerson !
Need further confirmation.
Our proposed way of agent installation will remain eligible for support by Nagios. Is that correct?
Re: Install multiple instance of NRPE agent
Posted: Thu Mar 14, 2019 3:20 pm
by scottwilkerson
anilgupta wrote:Thanks for the response scottwilkerson !
Need further confirmation.
Our proposed way of agent installation will remain eligible for support by Nagios. Is that correct?
Sure, but if you need assistance with this you are going to have to outline what you did
each time as this is not standard at all and our techs will not be anticipating this.