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

Module connects to Redis but doesn't send events #14

Closed rickatnight11 closed 9 years ago

rickatnight11 commented 9 years ago

I'm using flapjackfeeder4-v0.0.5.o on a Nagios 4.0.8 install (wired up to a Redis 3.0.2 server, if that matters), and when I start Nagios the log shows:

[1436914037] Nagios 4.0.8 starting... (PID=94053)
[1436914037] Local time is Tue Jul 14 15:47:17 PDT 2015
[1436914037] LOG VERSION: 2.0
[1436914037] qh: Socket '<omitted>/nagios/var/rw/nagios.qh' successfully initialized
[1436914037] qh: core query handler registered
[1436914037] nerd: Channel hostchecks registered successfully
[1436914037] nerd: Channel servicechecks registered successfully
[1436914037] nerd: Channel opathchecks registered successfully
[1436914037] nerd: Fully initialized and ready to rock!
[1436914037] wproc: Successfully registered manager as @wproc with query handler
[1436914037] wproc: Registry request: name=Core Worker 94054;pid=94054
[1436914037] wproc: Registry request: name=Core Worker 94055;pid=94055
[1436914037] wproc: Registry request: name=Core Worker 94057;pid=94057
[1436914037] wproc: Registry request: name=Core Worker 94058;pid=94058
[1436914037] wproc: Registry request: name=Core Worker 94059;pid=94059
[1436914037] wproc: Registry request: name=Core Worker 94063;pid=94063
[1436914037] wproc: Registry request: name=Core Worker 94062;pid=94062
[1436914037] wproc: Registry request: name=Core Worker 94060;pid=94060
[1436914037] wproc: Registry request: name=Core Worker 94056;pid=94056
[1436914037] wproc: Registry request: name=Core Worker 94064;pid=94064
[1436914037] wproc: Registry request: name=Core Worker 94065;pid=94065
[1436914037] wproc: Registry request: name=Core Worker 94061;pid=94061
[1436914037] flapjackfeeder: Copyright (c) 2013-2015 Birger Schmidt, derived from npcdmod
[1436914037] flapjackfeeder: This is version 'v0.0.5' running.
[1436914037] flapjackfeeder: redis connection (<omitted>.net:6379debug_level=0) has to be (re)established.
[1436914037] flapjackfeeder: redis connection (<omitted>.net:6379debug_level=0) established.
[1436914037] Error: Failed to add event to squeue '(nil)' with prio 1: Operation now in progress
[1436914037] Event broker module '<omitted>/nagios/lib/flapjackfeeder4-v0.0.5.o' initialized successfully.
[1436914037] Successfully launched command file worker with pid 94066

I'm not sure if that Error message is related, but while there's an active connection to the Redis database, events aren't being sent (validated by querying Redis and running a tcpdump, which shows no traffic other than the initial connection establishment).

EDIT: I just fixed a bug in the nagios config (missing line break), so the redis connection lines are now correct:

[1436916334] flapjackfeeder: Copyright (c) 2013-2015 Birger Schmidt, derived from npcdmod
[1436916334] flapjackfeeder: This is version 'v0.0.5' running.
[1436916334] flapjackfeeder: redis connection (<omitted>.net:6379) has to be (re)established.
[1436916334] flapjackfeeder: redis connection (<omitted>.net:6379) established.
[1436916334] Error: Failed to add event to squeue '(nil)' with prio 1: Operation now in progress
[1436916334] Event broker module '/opt/palantir/houston/releases/current/services/nagios/lib/flapjackfeeder4-v0.0.5.o' initialized successfully.

...but I'm still getting the same error and the same behavior.

jessereynolds commented 9 years ago

Can you see an established connection with netstat, eg netstat -an | grep 6379 on both ends?

rickatnight11 commented 9 years ago

Yes, both sides see the connection, and tcpdump only shows the TCP establish and teardown packets when Nagios stops/starts.

rickatnight11 commented 9 years ago

Ahah, it turns out I had event_broker_options=0. I change it to -1 and events are flowing.