Alexander A. Klimov
7c7c5e28f5
Implement LazyInit<T>
2019-04-01 11:40:14 +02:00
Michael Friedrich
149f640fd8
Improve DB IDO HA failover behaviour
...
- Decrease Object Authority updates to 10s (was 30s)
- Decrease failover timeout to 30s (was 60s)
- Decrease cold startup (after (re)start) with no OA updates to 30s (was 60s)
- Immediately connect on Resume()
- Fix query priority which got broken with #6970
- Add more logging when a failover is in progress
```
[2019-03-29 16:13:53 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 8.33246s ago (< failover timeout of 30s). Retrying.
[2019-03-29 16:14:23 +0100] information/IdoMysqlConnection: Last update by endpoint 'master1' was 38.3288s ago. Taking over 'ido-mysql' in HA zone 'master'.
```
- Add more logging for reconnect and disconnect handling
- Add 'last_failover' attribute to IDO*Connection objects
refs #6970
2019-04-01 08:50:00 +02:00
Michael Friedrich
6ace8001d8
Merge pull request #7019 from Icinga/feature/new-json-library
...
Replace YAJL with nlohmann::json
2019-03-18 17:26:57 +01:00
Alexander A. Klimov
0cf10c6306
Make buildable with VS 2017
2019-03-18 15:07:57 +01:00
Alexander A. Klimov
2a05b46431
Auto-sanitize data before en-/decoding JSON
2019-03-18 15:07:57 +01:00
Alexander A. Klimov
9daca0b216
Get rid of YAJL
2019-03-18 15:07:57 +01:00
Alexander A. Klimov
5882594b43
JsonEncode(): use nlohmann::json
2019-03-18 15:07:57 +01:00
Alexander A. Klimov
1b0367b740
JsonDecode(): use nlohmann::json::sax_parse()
2019-03-18 15:07:57 +01:00
Michael Friedrich
724b34c6f2
Integrate nlohmann_json into CMake
...
Better integration into base/json.cpp
Signed-off-by: Alexander A. Klimov <alexander.klimov@icinga.com>
2019-03-18 15:07:50 +01:00
Michael Friedrich
2de8bac588
Merge pull request #6990 from Icinga/bugfix/influxdbwriter-oom-6989
...
InfluxdbWriter: don't leak sockets
2019-03-18 14:38:04 +01:00
Michael Friedrich
ea80d93efc
Merge pull request #7014 from Icinga/feature/utf8cpp
...
Utility::ValidateUTF8(): use UTF8-CPP
2019-03-18 10:57:03 +01:00
Michael Friedrich
804c00ece5
Merge pull request #6999 from Icinga/bugfix/compiler-warnings
...
Suppress or fix compiler warnings
2019-03-18 08:44:30 +01:00
Alexander A. Klimov
a72f4db5c9
Utility::ValidateUTF8(): use UTF8-CPP
2019-03-15 13:34:20 +01:00
Michael Friedrich
026ed837ac
Merge pull request #6976 from Icinga/bugfix/so_reuseport-missing
...
Don't require OS headers to provide SO_REUSEPORT
2019-03-13 10:30:08 +01:00
Alexander A. Klimov
bf92e32496
Suppress or fix compiler warnings
2019-03-08 14:07:29 +01:00
Alexander A. Klimov
a9841a9197
Defer: ensure not to throw any exceptions out of a destructor
...
refs #6989
2019-03-01 14:29:35 +01:00
Michael Friedrich
e2df11520e
Merge pull request #6970 from Icinga/bugfix/perfdata-gaps
...
Improve reload handling for features (metric & queue flush, activation priority)
2019-02-26 15:38:15 +01:00
Alexander A. Klimov
bf0c68757f
Don't require OS headers to provide SO_REUSEPORT
2019-02-26 11:25:44 +01:00
Michael Friedrich
458f997a18
Replace Copyright header with a short version, part II
2019-02-25 15:09:36 +01:00
Michael Friedrich
d14a88235d
Replace Copyright header with a short version, part I
...
CLion -> replace in path
2019-02-25 14:48:22 +01:00
Michael Friedrich
ab7a799369
Implement ReloadTimeout constant and wait for enqueued checks on Stop()
2019-02-25 09:03:47 +01:00
Alexander A. Klimov
9558ebc0f4
Secure ApiUser::GetByAuthHeader() against timing attacks
2019-02-22 16:59:36 +01:00
Michael Friedrich
89634c2eb6
Re-add Defer functionality
2019-02-22 15:27:34 +01:00
Michael Friedrich
a25e2b1038
Stop object in reversed activation priority order
...
This stops the checker component first, then notifications, then
features, then config objects, then the API feature and logger(s).
Patch taken from @al2klimov
2019-02-20 12:38:57 +01:00
Michael Friedrich
5da1cbd096
Revert "Respect activation priority also on deactivation"
...
This reverts commit 8ad1717055
.
2019-02-19 14:30:44 +01:00
Michael Friedrich
a2f5b7a02c
Revert "CheckerComponent#Stop(): wait for all running checks"
...
This reverts commit 1eaad0637b
.
2019-02-19 14:05:00 +01:00
Michael Friedrich
d98c0704c4
Debug: Log calls to ConfigObject::Deactivate()
...
Only available in debug builds.
2019-02-19 13:49:52 +01:00
Michael Friedrich
0467c488e9
Merge pull request #6908 from Icinga/bugfix/perfdata-gaps
...
Ensure all perfdata to be written
2019-02-11 17:27:44 +01:00
Michael Friedrich
7a865aefd9
Merge pull request #6854 from Icinga/bugfix/unamehelper-inefficient-6452
...
Make UnameHelper() efficient
2019-02-11 16:57:17 +01:00
Alexander A. Klimov
8ad1717055
Respect activation priority also on deactivation
2019-02-06 11:17:45 +01:00
Michael Friedrich
4339240b46
Merge pull request #6858 from Icinga/feature/string-builder
...
Make string builder reusable
2019-02-04 16:05:20 +01:00
Michael Friedrich
77572c4424
Merge pull request #6901 from Icinga/bugfix/so_reuseport-6898
...
TcpSocket#Bind(): also set SO_REUSEPORT
2019-02-04 14:21:20 +01:00
Michael Friedrich
b58cb17e4b
Fix Convert::ToLong(double val)
2019-01-30 14:47:59 +01:00
Alexander A. Klimov
1eaad0637b
CheckerComponent#Stop(): wait for all running checks
2019-01-24 15:09:39 +01:00
Alexander A. Klimov
984f7be030
TcpSocket#Bind(): also set SO_REUSEPORT
...
refs #6898
2019-01-17 12:13:44 +01:00
Alexander A. Klimov
61860563a6
Make string builder reusable
2018-12-21 12:43:04 +01:00
Alexander A. Klimov
17e86f98a2
Make UnameHelper() efficient
...
refs #6452
2018-12-20 16:37:04 +01:00
Michael Friedrich
bf4ecbed69
Revert "ThreadPool#Stop(): discard non-processed queue items"
...
This reverts commit 30e6d0f809
.
refs #6815
2018-12-06 09:56:49 +01:00
Michael Friedrich
08c1539561
Merge pull request #6815 from Icinga/bugfix/reload-while-api-dos
...
ThreadPool#Stop(): discard non-processed queue items
2018-12-05 11:11:49 +01:00
Alexander A. Klimov
30e6d0f809
ThreadPool#Stop(): discard non-processed queue items
2018-12-03 16:38:52 +01:00
Michael Friedrich
f3cd3eb870
DSL: Implement getenv()
...
This patch also restores Utility::GetFromEnvironment()
and replaces the hardcoded `getenv()` calls.
2018-11-19 18:11:16 +01:00
Michael Friedrich
90de216cbb
Merge pull request #6479 from Icinga/feature/socketevents-inherit-object-6477
...
SocketEvents: inherit from Stream
2018-11-12 17:06:37 +01:00
Michael Friedrich
1f5555e1d6
Fix possible double free in StreamLogger::BindStream()
...
refs #6737
2018-11-08 15:51:58 +01:00
Alexander A. Klimov
a2ae01e64b
Socket engine: drop life support objects
...
refs #6477
2018-10-30 13:46:20 +01:00
Alexander A. Klimov
5134ccaf56
Make SocketEventDescriptor#EventInterface a SocketEvents::Ptr
...
refs #6477
2018-10-30 13:46:20 +01:00
Alexander A. Klimov
a9a9469868
SocketEvents: inherit from Stream
...
refs #6477
2018-10-30 13:46:20 +01:00
Michael Friedrich
5406ce6540
Ensure that API/JSON-RPC messages in the same session are processed and not stalled
...
This basically drops the "corked" implementation which just stalled the
TLS IO polling after some requests. If you need sort of rate limiting
for these events, use an external TLS proxy which terminates that in front
of Icinga.
fixes #6635
2018-10-29 12:57:24 +01:00
Michael Friedrich
7e1942e8e7
Merge pull request #6718 from Icinga/bugfix/ssl-shutdown
...
Call SSL_shutdown() at least twice
2018-10-24 11:46:32 +02:00
Michael Friedrich
dea5ec614e
icinga.com: Update CMakeLists.txt
2018-10-18 09:35:18 +02:00
Michael Friedrich
44c3b83769
icinga.com: Update '*.ti'
2018-10-18 09:30:00 +02:00