to add 2 broker_module in Nagios.cfg

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
diksharawat
Posts: 6
Joined: Wed Sep 26, 2018 2:25 am

to add 2 broker_module in Nagios.cfg

Post by diksharawat »

Hi,
I am using Nagios 4 and I am trying to add 2 broker_module in nagios.cfg. Both will point to alerta monitoring tool at different location.
I am using
broker_module=/usr/lib/nagios/alerta-neb.o https://ip-1:port/api
broker_module=/usr/lib/nagios/alerta-neb.o https://ip-2:port/api

using this configuration, only first borker_module is working.Please help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: to add 2 broker_module in Nagios.cfg

Post by scottwilkerson »

You actually will likely need to make a copy or a symlink to the file to get the second one to work because the file path is the same I'm sure nagios is dis-regarding it. Then use something like this:

Code: Select all

broker_module=/usr/lib/nagios/alerta-neb.o https://ip-1:port/api
broker_module=/usr/lib/nagios/alerta-neb2.o https://ip-2:port/api
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
diksharawat
Posts: 6
Joined: Wed Sep 26, 2018 2:25 am

Re: to add 2 broker_module in Nagios.cfg

Post by diksharawat »

Thanks for the quick reply @scottwilkerson.
I even tried to copy file in another location and giving new path in another broker_module, but still only one of them is working.
I am sorry if this is not what you meant.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: to add 2 broker_module in Nagios.cfg

Post by scottwilkerson »

diksharawat wrote:Thanks for the quick reply @scottwilkerson.
I even tried to copy file in another location and giving new path in another broker_module, but still only one of them is working.
I am sorry if this is not what you meant.
this is what I meant, but it may not be possible, if the NEB registers with the same name every time, Nagios is going to only allow one.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked