Install multiple instance of NRPE agent
Install multiple instance of NRPE agent
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.
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Install multiple instance of NRPE agent
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
The biggest thing to make sure of is that you do not make identical command names
Code: Select all
--with-nrpe-port=4666Instead 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
Code: Select all
include_dir=/path/to/custom/nrpe/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
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,
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,
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Install multiple instance of NRPE agent
yesanilgupta 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?
yesanilgupta wrote:2) We will just be creating another directory where we will define our command. Is this correct?
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 fileanilgupta 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.
Code: Select all
./configure --help
Re: Install multiple instance of NRPE agent
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.
We would like to discuss this in detail. Can we please have phone conversation on this?
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-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Install multiple instance of NRPE agent
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.anilgupta wrote:But I am concerned as what other files/directories needs to be updated as you stated below.
Re: Install multiple instance of NRPE agent
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.
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.
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Install multiple instance of NRPE agent
That sounds right to me.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.
Re: Install multiple instance of NRPE agent
Thanks for the response scottwilkerson !
Need further confirmation.
Our proposed way of agent installation will remain eligible for support by Nagios. Is that correct?
Need further confirmation.
Our proposed way of agent installation will remain eligible for support by Nagios. Is that correct?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Install multiple instance of NRPE agent
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.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?