Page 1 of 1

Multiple NSCA daemons

Posted: Thu Sep 19, 2013 7:29 am
by HFroyen
Hi all,

I'm sitting here with a little problem :

I'm using multiple Nagios Core instances running besides each other on the same virtual machine.
Now I wanted some of the external checks of a server (which I configured on one Nagios instance) also on the other Nagios instance.
But in the /etc/nsca.conf there's only one command_file line (which in this case points to the nagios.cmd of the first Nagios instance).

If I change the command_file directive in my nagios.cfg of my secondary Nagios instance to the nagios.cmd of the first instance, nsca sends one result to my first instance, than the second result to the second and so on.

Now I was wondering if it could be possible to compile a second nsca daemon with a different nsca.cfg that handles passive checks for my secondary Nagios instance.
This would be great since I can't find any possible documentation on this.

Cheers!

Re: Multiple NSCA daemons

Posted: Thu Sep 19, 2013 9:23 am
by slansing
This would not be advisable since they both need to use port 5667 and running duplicates of files, trying to open the same file at the same time while something else may be writing to it is also bad news. In short no, I have not heard a success story for multiple NSCA or NRPE agent's installed on the same site. However, you could forward checks from one NSCA server to another.

Re: Multiple NSCA daemons

Posted: Thu Sep 19, 2013 9:43 am
by HFroyen
Ah ok thanks.
Although I saw an option in the ./configure : --with-nsca-port=

I thought we could maybe put that on port 5668.. :D

Re: Multiple NSCA daemons

Posted: Thu Sep 19, 2013 2:47 pm
by slansing
You may be able to configure it to use a separate port, however this probably won't fix the issue of how are you going to validly run multiple NSCA instances, the default use port is 5667 this may just change that on configuration in case you need to use another port. You can always experiment but I'm not sure how far you will be able to get.

Re: Multiple NSCA daemons

Posted: Fri Sep 20, 2013 1:32 am
by HFroyen
slansing wrote:You may be able to configure it to use a separate port, however this probably won't fix the issue of how are you going to validly run multiple NSCA instances, the default use port is 5667 this may just change that on configuration in case you need to use another port. You can always experiment but I'm not sure how far you will be able to get.
I'll get back to this once I found a valid and clean solution! :D
But thanks in advance for the tips!

Re: Multiple NSCA daemons

Posted: Fri Sep 20, 2013 10:21 am
by slansing
Sure! Once you have gotten down to trying this, we can help as much as possible, theoretical ideas are a bit hard to support. :)