40 Commits

Author SHA1 Message Date
Michael Friedrich
d7f6d7994b Move stats into a separate file 2019-11-02 14:00:23 +01:00
Michael Friedrich
79f06a90d4 WIP 2019-11-02 14:00:23 +01:00
Michael Friedrich
ddf2aea065 Compile redis into the icinga2 binary; apply more C++11 code changes 2019-11-02 14:00:23 +01:00
Michael Friedrich
61edfcb68d Apply code style 2019-11-02 14:00:23 +01:00
Jean Flach
5eab856673 Publish events to one enpoint 2019-11-02 14:00:23 +01:00
Jean Flach
c8561676ec Add limit for subscriptions 2019-11-02 14:00:23 +01:00
Gunnar Beutner
f631bf8cb5 Use sets for subscriptions
refs #5656
2019-11-02 14:00:23 +01:00
Gunnar Beutner
1725038ca8 Implement pipelining support for Redis queries
fixes #5670
2019-11-02 14:00:23 +01:00
Jean Flach
7c8412928e Subscriptions
fixes #5656
2019-11-02 14:00:23 +01:00
Jean Flach
1ada53dd57 Trim event queue
TODO: make configurable

refs #5119
2019-11-02 14:00:23 +01:00
Gunnar Beutner
fff1049ba0 Ensure that the WorkQueue name is set 2019-11-02 14:00:23 +01:00
Gunnar Beutner
b75e21a998 Redis support (WIP) 2019-11-02 14:00:23 +01:00
Michael Friedrich
6397fedc3d Remove experimental redis feature before 2.7 release 2017-06-20 11:52:24 +02:00
Thomas Gelf
ed2ebdf0d0 RedisWriter: publish Icinga 2 stats as a simple "keepalive"
Use case: a reader subscribes to config changes. As they happen rarely, chances
are good that the connection will time out in the meantime. Now, a reconnect is
easy - but you wouldn't know whether you missed any config changes. So you are
required to issue a new sync to be on the safe side. Given a 60sec connection
timeout (think: SSL layer, firewalls etc) when no traffic happens this would be
too expensive.

Some kind of a heartbeat available for subscription would allow subscribers to
artificially keep the connection alive. As a first simple solution to this I'd
suggest to publish CIB data, that might be useful anyways.

refs #4991
fixes #5098

Signed-off-by: Michael Friedrich <michael.friedrich@icinga.com>
2017-03-29 10:17:03 +02:00
Michael Friedrich
af3e2c429f Add exception handler for Redis WorkQueue
refs #4991
2017-03-29 10:17:03 +02:00
Michael Friedrich
a5556cbaae Add log message for config/status dump end for Redis
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
9de4c8bc58 Fix memory leak in RedisWriter::ExecuteQuery
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
dac9775b93 Add COUNT parameter for SCAN
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
844e2bf68c Replace existing queries with ExecuteQuery() calls
refs #4991
2017-03-29 10:17:03 +02:00
Michael Friedrich
fcd9e3666d Implement config dump/update/delete publishing; fix runtime created object creation
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
75bfd775b9 Implement RedisWriter::ExecuteQuery
refs #4991
2017-03-29 10:17:03 +02:00
Gunnar Beutner
6b48a36192 Implement the db_index property for the RedisWriter class
fixes #5081
2017-03-29 10:17:03 +02:00
Gunnar Beutner
dd7862f08a Add missing freeReplyObject calls
refs #4991
2017-03-16 15:09:41 +01:00
Gunnar Beutner
00eba25ad7 Add ASSERTs for the Redis queries
refs #4991
2017-03-16 15:09:41 +01:00
Gunnar Beutner
18e6474f1e Make sure all Redis tasks are executed on the WQ threads
refs #4991
2017-03-16 14:23:31 +01:00
Michael Friedrich
e5c0295c9e Redis: First attempt of a reconnect config dump
refs #5072
refs #4991
2017-03-16 13:58:18 +01:00
Gunnar Beutner
96b3c7d90b Get rid of event IDs for Redis
fixes #5067
2017-03-15 15:10:58 +01:00
Gunnar Beutner
1cab2d7b16 Fix incorrect handling for SCAN results
fixes #5065
2017-03-15 14:55:41 +01:00
Gunnar Beutner
4da5f7d52c Add another log message
refs #4991
2017-03-15 14:55:37 +01:00
Gunnar Beutner
a21da31ef6 Add missing free call
refs #4991
2017-03-15 14:55:19 +01:00
Gunnar Beutner
34c69d9556 Only send events to Redis when there is at least one subscriber
refs #4991
2017-03-14 15:19:02 +01:00
Gunnar Beutner
10ddcbe4d3 Implement support for expiring subscriptions
refs #4991
2017-03-14 15:19:02 +01:00
Michael Friedrich
3e98e3fb2c Better error handling and fixes
refs #4991
2017-03-14 15:18:39 +01:00
Michael Friedrich
d3e3159e6b Implement event subscriptions
refs #4991
2017-03-14 14:47:06 +01:00
Michael Friedrich
a8587f5697 Ensure to check the auth command return value
refs #4991
2017-03-14 14:46:58 +01:00
Gunnar Beutner
b3e727e1e7 Fix spelling mistake
refs #4991
2017-02-21 11:38:50 +01:00
Rune Darrud
e6ae582104 Add a log message for RedisWriter on start and stop
fixes #5006

Signed-off-by: Gunnar Beutner <gunnar.beutner@icinga.com>
2017-02-15 14:33:04 +01:00
Gunnar Beutner
6d620e75ed Improve reconnect behavior for the RedisWriter class
refs #4991
2017-02-13 14:21:13 +01:00
Gunnar Beutner
8ad567ce99 Implement UNIX domain socket support for the RedisWriter class
refs #4991
2017-02-13 14:21:13 +01:00
Gunnar Beutner
31650b0beb Add RedisWriter class
refs #4991
2017-02-09 16:40:11 +01:00