flapjack / flapjackfeeder

Nagios/Icinga event broker module (neb), inserts events to Flapjack's Redis queue
GNU General Public License v2.0
8 stars 5 forks source link

Two flapjackfeeders doesn't work #11

Closed jessereynolds closed 9 years ago

jessereynolds commented 9 years ago

If you try and configure two flapjackfeeder brokers in your Nagios, only the first of them will actually transmit events on to Flapjack, however both will establish their own TCP sockets to redis.

I also tried changing the NEBMODULE_MODINFO_TITLE to "flapjackfeeder-staging" and compiling it to "flapjackfeeder-staging.o" but this makes no difference.

Perhaps there's some global variables that are in scope in both instances of the module, or something.

jessereynolds commented 9 years ago

Example config:

broker_module=/usr/local/lib/flapjackfeeder.o redis_host=flapjack.example,redis_port=6380
broker_module=/usr/local/lib/flapjackfeeder-staging.o redis_host=flapjack-staging.example,redis_port=6380
bs-github commented 9 years ago

I've tested quite a lot and came up with a version where I changed all the names. That worked, but is less that optimal and therefore I reverted that right away. See here: https://github.com/flapjack/flapjackfeeder/commit/5dfa82a3e0da6ee035a3b2baae399cf55248603d

The better way to go would surely be to modify the code to support multiple targets.

jessereynolds commented 9 years ago

Makes sense @bs-github

We need to take care we're not introducing latency into Nagios's check execution by adding a second redis endpoint for flapjackfeeder.

bs-github commented 9 years ago

pending merge: https://github.com/flapjack/flapjackfeeder/pull/12