Commit Graph

4710 Commits

Author SHA1 Message Date
Alexander A. Klimov e6d78bf361 Move some TCP/TLS logic out of ApiListener
... for re-using it
2019-04-01 13:31:16 +02:00
Alexander A. Klimov 79220ee647 io-engine.hpp: fix missing namespace 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 8b3efe5759 Introduce AsioConditionVariable 2019-04-01 13:31:16 +02:00
Alexander A. Klimov d3392d1579 Rename AsioTlsStreamHack to UnbufferedAsioTlsStream 2019-04-01 13:31:16 +02:00
Alexander A. Klimov e129c561d5 HttpServerConnection: don't disconnect during sending response 2019-04-01 13:31:16 +02:00
Alexander A. Klimov b384f859c9 Make IoEngine::m_CpuBoundSemaphore signed 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 326bf66255 ApiListener: use setsockopt(), not tcp::acceptor#set_option() 2019-04-01 13:31:16 +02:00
Alexander A. Klimov b5fddaf3ce ApiListener: log why bind(2) failed 2019-04-01 13:31:16 +02:00
Alexander A. Klimov e26774c7f8 IoEngine: adjust I/O threads 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 19625e62ef ApiListener: fix self-made security hole 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 87b0c452db HttpServerConnection: re-add automatic disconnect 2019-04-01 13:31:16 +02:00
Alexander A. Klimov f029fd4884 Re-add HttpServerConnection#Disconnect() 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 16913cb977 JsonRpcConnection: add missing CpuBoundWork 2019-04-01 13:31:16 +02:00
Alexander A. Klimov a451327b81 JsonRpcConnection: re-add num_json_rpc_work_queue_item_rate 2019-04-01 13:31:16 +02:00
Alexander A. Klimov a54bd9d5c4 JsonRpcConnection: re-add automatic disconnect 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 7aae8bd265 JsonRpcConnection: re-add heartbeats 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 84b411501b Re-add JsonRpcConnection#Disconnect() 2019-04-01 13:31:16 +02:00
Alexander A. Klimov 2d16b02520 ApiListener#NewClientHandlerInternal(): shut down TLS stream 2019-04-01 13:30:42 +02:00
Alexander A. Klimov c46157d552 ApiListener: fix self-made security hole 2019-04-01 11:40:14 +02:00
Alexander A. Klimov f9fff54da2 ApiListener: don't require a valid certificate for the TLS handshake to complete 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 6c86c127f1 Port JsonRpcConnection to Boost ASIO 2019-04-01 11:40:14 +02:00
Alexander A. Klimov c76947e8b9 JsonRpc::ReadMessage(): add Boost ASIO overload 2019-04-01 11:40:14 +02:00
Alexander A. Klimov b26808414c NetString::ReadStringFromStream(): add Boost ASIO overload 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 48b5824e37 ApiListener: send icinga::Hello message 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 49ac7777e0 JsonRpc::SendMessage(): add Boost ASIO overload 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 43658de529 NetString::WriteStringToStream(): add Boost ASIO overload 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 832365195d ApiListener: connect(2) via Boost ASIO 2019-04-01 11:40:14 +02:00
Alexander A. Klimov e9a64abd09 ApiListener#ListenerCoroutineProc(): catch more edge cases 2019-04-01 11:40:14 +02:00
Alexander A. Klimov a6813ec786 ApiListener: restore previous bind(2) behavior 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 282f8fd173 IoEngine: explicitly join I/O threads 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 493a97f4f3 EnsureAcceptHeader(): fix wrong condition 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 8c5d629d35 /v1/events: don't truncate any events 2019-04-01 11:40:14 +02:00
Alexander A. Klimov ac72ca4ae6 Don't warn that Boost.Coroutine v1 is deprecated 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 7681ec10a4 /v1/events: don't lock I/O thread 2019-04-01 11:40:14 +02:00
Alexander A. Klimov d7b465ce74 Implement IoBoundWorkSlot 2019-04-01 11:40:14 +02:00
Alexander A. Klimov fd239ba3fe Adjust /v1/events, too 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 1941c1da28 Adjust all HTTP handlers (ex. /v1/events) 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 9ae1d732af HttpServerConnection: actually handle requests 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 7fe0431ada HttpServerConnection: verify requests via Boost ASIO + Beast 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 04a9879acc Add HttpUtility::SendJsonError() overload for Boost/Beast 2019-04-01 11:40:14 +02:00
Alexander A. Klimov fc22cbaf09 Add HttpUtility::SendJsonBody() overload for Boost/Beast 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 2d7714802d Allow CpuBoundWork to be done before end of scope 2019-04-01 11:40:14 +02:00
Alexander A. Klimov e21956e26e ApiListener: detect protocol 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 539855bac1 ApiListener: verify peer 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 720c53ab77 ApiListener: perform TLS handshake 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 2615967e7f Make ApiListener#m_SSLContext a Boost ASIO SSL context 2019-04-01 11:40:14 +02:00
Alexander A. Klimov e4f3422b3a ApiListener: listen(2) via Boost ASIO 2019-04-01 11:40:14 +02:00
Alexander A. Klimov c547e9a863 Implement basic I/O engine 2019-04-01 11:40:14 +02:00
Alexander A. Klimov 7c7c5e28f5 Implement LazyInit<T> 2019-04-01 11:40:14 +02:00
Michael Friedrich 2913291a17 ido Check: Add last failover timestamp to output when HA enabled IDO is running 2019-04-01 09:31:03 +02:00
Michael Friedrich 4a26a48778 Code Quality: Move authority.cpp into the ApiListener class scope 2019-04-01 08:51:18 +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 48b3d25ce2 Fix license headers 2019-03-28 11:47:47 +01:00
Michael Friedrich 566e59bbfa Make NotificationResult available for events: Cluster and Features 2019-03-28 11:42:28 +01:00
Michael Friedrich 1706b297a5 Implement last_notification_result handling for Notification objects 2019-03-28 10:43:35 +01:00
Michael Friedrich ac483f2a8a Add OnNewNotificationResult signal and ProcessNotificationResult handler 2019-03-28 10:42:04 +01:00
Michael Friedrich 9621fd2e4b Add NotificationResult class 2019-03-28 10:42:04 +01:00
Michael Friedrich c2bf4cca9f Disable feature HA by default (InfluxDB, Graphite, Gelf, Elasticsearch, OpenTSDB, Perfdata) 2019-03-27 15:29:47 +01:00
Michael Friedrich 93030709f5 Implement previous_state_change 2019-03-27 11:43:14 +01:00
Michael Friedrich 06eacd13ab Also apply buffer flush fix for Elasticsearch feature 2019-03-27 11:35:41 +01:00
Michael Friedrich cb3729bc6a InfluxDB: Flush only if there's data in the buffer
Regression from 2.10.4
2019-03-27 11:26:00 +01:00
Michael Friedrich 27a41804fc Elasticsearch: Change Content-Type header to 'application/x-ndjson' for bulk streams
fixes #6609
2019-03-20 10:13:38 +01:00
Michael Friedrich 424929e66a Improve logging of OpenTsdbWriter 2019-03-19 09:39:14 +01:00
Michael Friedrich acf62d487e Improve logging of GelfWriter 2019-03-19 09:39:14 +01:00
Michael Friedrich 783a4c832c Improve logging of ElasticsearchWriter 2019-03-19 09:39:14 +01:00
Michael Friedrich aa93c382e1 Improve logging of InfluxdbWriter 2019-03-19 09:39:14 +01:00
Michael Friedrich 82dcb3965b Improve logging of GraphiteWriter 2019-03-19 09:39:09 +01:00
Michael Friedrich 9f91ab98b8
Merge pull request #7027 from Icinga/feature/es-improve-error-handling
Elasticsearch: Improve error handling/logging
2019-03-19 08:35:16 +01: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
Michael Friedrich 816a935b3d Elasticsearch: Improve error handling/logging
- Missing content-type
- Wrong content-type shouldn't hide the error message
- Error message should include more details (request URL, etc.)
2019-03-18 16:41:01 +01:00
Alexander A. Klimov b2e2b587da ElasticsearchWriter: don't leak sockets
refs #7018
2019-03-18 15:09:07 +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 ac354f9e80 Don't abuse goto for building simple loops 2019-03-08 14:59:01 +01:00
Alexander A. Klimov bf92e32496 Suppress or fix compiler warnings 2019-03-08 14:07:29 +01:00
Alexander A. Klimov 37b044ecda PkiUtility::NewCa(): just warn if the CA files already exist 2019-03-01 14:37:45 +01:00
Alexander A. Klimov 2a6b122413 InfluxdbWriter: don't leak sockets
refs #6989
2019-03-01 14:30:49 +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 37b715baf1 Replace a few more copyright strings 2019-02-25 16:30:40 +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 53acb8f2db PerfdataWriter: Reset the rotation timer on Pause() 2019-02-22 09:34:16 +01:00
Michael Friedrich 30d98b49eb
Merge pull request #6896 from Icinga/bugfix/notification-delay-5561
Notification#BeginExecuteNotification(): SetNextNotification() correctly
2019-02-22 09:27:59 +01:00
Michael Friedrich 68e7027c93 GelfWriter: Ensure to join queue and execute queries on Pause/Shutdown/Reload 2019-02-20 17:18:24 +01:00
Michael Friedrich 24c3572b03 OpenTsdbWriter: Ensure to reset reconnect timer on Pause() 2019-02-20 17:17:45 +01:00
Michael Friedrich 301c48e9bc ElasticWriter: Ensure to flush buffers on Pause/Shutdown/Reload 2019-02-20 17:11:39 +01:00
Michael Friedrich 1bfe756cb1 DB IDO: Improve queue handling on Pause/Shutdown/Reload 2019-02-20 17:10:46 +01:00
Michael Friedrich d4bdebc795 InfluxdbWriter: Ensure to flush buffers after emptying the metrics queue on Pause/Shutdown/Reload
Patch taken from @al2klimov but moved into Pause()
2019-02-20 16:30:13 +01:00
Michael Friedrich d79390083d GraphiteWriter: Improve Pause/Shutdown/Reload handling for metrics 2019-02-20 14:54:23 +01:00
Michael Friedrich 388999a86f PerfdataWriter: Rotate and close files on Pause/Shutdown/Reload
Refactored the code into a local mutex and added
some more debug logging while at it.
2019-02-20 14:20:53 +01:00
Michael Friedrich 7936a147ba Activate downtimes before any checkable object 2019-02-20 13:56:15 +01:00
Michael Friedrich a4f97c1246 Stop the IcingaApplication at the latest point, before any loggers 2019-02-20 13:55: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 9d5dc4afc1 Start the checker component at the latest point possible 2019-02-20 12:37:48 +01:00
Michael Friedrich cc8dd42c0a Start the notification component after general features 2019-02-20 12:11:59 +01:00
Michael Friedrich 819594e7b4
Merge pull request #6953 from Icinga/bugfix/style
Fix indent in configcompiler.cpp
2019-02-20 11:32:29 +01:00
Michael Friedrich 7b2b45b503 Revert "InfluxdbWriter#Stop(): flush buffer"
This reverts commit 8470facfe2.
2019-02-19 14:54:28 +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 4edd3ece66 Revert "Deactivate perfdata writers after checker"
This reverts commit f0e12ff63c.
2019-02-19 14:06:15 +01:00
Michael Friedrich d2e049d575 Revert "CheckerComponent#Stop(): log after actually being stopped"
This reverts commit b81aa6af3a.
2019-02-19 14:05:07 +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 3ad911a57c Fix indent in configcompiler.cpp 2019-02-15 12:24:49 +01:00
Michael Friedrich b08d485a41
Merge pull request #6857 from Icinga/bugfix/check_nscp_api-query-sorted-6536
Url#m_Query: preserve order
2019-02-11 17:57:32 +01:00
Michael Friedrich 845c72f656
Merge pull request #6882 from Icinga/bugfix/influxdb-gaps-6841
InfluxdbWriter#Stop(): flush buffer
2019-02-11 17:32:05 +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
Michael Friedrich b81f7a7415
Merge pull request #6577 from Icinga/fix/setup-api-including-users-file
Include api user configuration file during api setup
2019-02-11 16:41:46 +01:00
Michael Friedrich 4c1a54073c
Merge pull request #6748 from Icinga/bugfix/api-setup-fails-missing-confd
Fix api setup to automatically create the conf.d directory
2019-02-11 16:35:57 +01:00
Peter Eckel 5d59863725 Avoid duplicating non-zero count message replay messages in the debug log 2019-02-11 13:54:17 +01:00
Michael Friedrich d1fb1a8eda Refactor conditions and add debug log messages for future crs and skipped crs 2019-02-08 13:32:13 +01:00
Jean Flach c97f3c80f5 Fix checkresults from the future breaking checks 2019-02-08 12:08:40 +01:00
Michael Friedrich 7ce30a86b8 Enhance notification logging
- More details from the local context (notification, user, checkable, command names)
- Notice logs for when this notification object is paused in HA enabled zones
- Notice logs for interval=0 reminder notifications
- Object name for skipping recovery notifications when problem hasn't been notified before
2019-02-07 15:42:09 +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 04de273405
Merge pull request #6914 from Icinga/bugfix/clusterevents-missing-persistent-ack
ClusterEvents::AcknowledgementSet event should forward 'persistent' attribute
2019-02-04 13:52:44 +01:00
Michael Friedrich 5a8729fddd
Merge pull request #6853 from Icinga/bugfix/incorrect-command_endpoint-6666
Checkable: require zone to be set if command_endpoint is set
2019-02-04 13:51:31 +01:00
Michael Friedrich eb155495f7
Merge pull request #6916 from Icinga/bugfix/retry-interval-zero
Don't allow retry_interval <= 0
2019-01-30 15:28:26 +01:00
Michael Friedrich b58cb17e4b Fix Convert::ToLong(double val) 2019-01-30 14:47:59 +01:00
Michael Friedrich 530f890cab
Merge pull request #6917 from Icinga/bugfix/cluster-message-delete-object
Cluster: Delete object message should log that
2019-01-29 13:37:50 +01:00
Alexander A. Klimov ce847324bc Downtime::AddDowntime(): place Downtimes in the same zone as the origin ScheduledDowntimes 2019-01-28 18:29:57 +01:00
Michael Friedrich b16c22448e Cluster: Delete object message should log that
Atm it is a copy-paste error and irritates during debugging.
Coming from my analysis of existing cluster messages.
2019-01-28 17:39:22 +01:00
Michael Friedrich 8cbd482072 Don't allow retry_interval <= 0 2019-01-28 17:33:05 +01:00
Michael Friedrich 9f2ccfbaa0 ClusterEvents::AcknowledgementSet event should forward 'persistent' attribute 2019-01-28 17:29:46 +01:00
Michael Friedrich b1442645ce
Merge pull request #6897 from Icinga/bugfix/getlocalzone-null
Validate Zone::GetLocalZone() before using
2019-01-25 08:31:57 +01:00
Alexander A. Klimov 1eaad0637b CheckerComponent#Stop(): wait for all running checks 2019-01-24 15:09:39 +01:00
Alexander A. Klimov b81aa6af3a CheckerComponent#Stop(): log after actually being stopped 2019-01-24 13:55:17 +01:00
Alexander A. Klimov f0e12ff63c Deactivate perfdata writers after checker 2019-01-24 13:50:26 +01:00
Michael Friedrich 6b7f651478
Merge pull request #6899 from Icinga/bugfix/localtime-zero-windows
Log: Ensure not to pass negative values to localtime()
2019-01-24 10:58:43 +01:00
Alexander A. Klimov 984f7be030 TcpSocket#Bind(): also set SO_REUSEPORT
refs #6898
2019-01-17 12:13:44 +01:00
Michael Friedrich 2fc33996b6 Log: Ensure not to pass negative values to localtime()
refs #6887
2019-01-16 17:27:38 +01:00
Michael Friedrich 21a592acdd
Merge pull request #6883 from Icinga/bugfix/retry-interval-zero-6871
Allow Checkable#retry_interval to be 0
2019-01-16 15:00:03 +01:00
Alexander A. Klimov b09e7b287e Validate Zone::GetLocalZone() before using 2019-01-15 19:23:20 +01:00
Alexander A. Klimov 3b2054761a Notification#BeginExecuteNotification(): SetNextNotification() correctly
refs #5561
2019-01-11 18:25:12 +01:00
Jean Flach 2aff6a5887 Don't run UpdateObjectAuthority for Comments and Downtimes 2019-01-10 11:44:14 +01:00
Alexander A. Klimov 9ae738d17f Allow Checkable#retry_interval to be 0
refs #6871
2019-01-09 11:27:33 +01:00
Michael Friedrich e1a941e5c7
Merge pull request #6880 from Icinga/bugfix/pki-requestcertificate-no-cert
pki::RequestCertificate: handle missing certificate/CSR
2019-01-09 09:30:27 +01:00
Alexander A. Klimov 8470facfe2 InfluxdbWriter#Stop(): flush buffer
refs #6841
2019-01-08 18:15:32 +01:00
Alexander A. Klimov 4a7960f21b pki::RequestCertificate: handle missing certificate/CSR 2019-01-08 11:49:44 +01:00
Alexander A. Klimov f4ab0737d1 HttpServerConnection#DataAvailableHandler(): reduce log spam 2019-01-07 15:32:19 +01:00
Alexander A. Klimov 61860563a6 Make string builder reusable 2018-12-21 12:43:04 +01:00
Alexander A. Klimov eeb609d4ae Url#m_Query: preserve order
refs #6536
2018-12-21 11:52:37 +01:00
Alexander A. Klimov 17e86f98a2 Make UnameHelper() efficient
refs #6452
2018-12-20 16:37:04 +01:00
Alexander A. Klimov 12f3149eef Checkable: require zone to be set if command_endpoint is set
refs #6666
2018-12-20 13:59:28 +01:00
Michael Friedrich c4d57afa3d
Merge pull request #6821 from Icinga/bugfix/downtimes-disappear-satellite-6542
Don't delete downtimes in satellite zones
2018-12-18 16:13:36 +01:00
Michael Friedrich b40400e79f
Merge pull request #6826 from Icinga/bugfix/downtimes-recreate-satellite-6542
Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
2018-12-18 16:12:34 +01:00
Alexander A. Klimov c98d6a5254 Downtime#HasValidConfigOwner(): respect Downtime#authoritative_zone
refs #6542
2018-12-17 15:54:31 +01:00
Alexander A. Klimov 5431eae116 Add and populate Downtime#authoritative_zone
refs #6542
2018-12-17 15:54:23 +01:00
Michael Friedrich ba8d79f3c5 API Event Streams: Add 'command' for Notification events
fixes #6824
2018-12-07 09:37:03 +01:00
Alexander A. Klimov 39e0d787e8 Downtime#HasValidConfigOwner(): wait for ScheduledDowntimes
refs #6542
2018-12-06 15:44:57 +01:00
Alexander A. Klimov bbcf469af1 Implement ScheduledDowntime::AllConfigIsLoaded()
refs #6542
2018-12-06 15:44:51 +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 Insel 1352b15220 Fix string comparison on edge cases
This fixes a few edge cases where the string comparison failed before.
2018-12-05 20:12:06 +01:00
Michael Friedrich b58ce84b0e
Merge pull request #6817 from Icinga/bugfix/stalled-tls-connections-6816
HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
2018-12-05 11:35:35 +01:00
Michael Friedrich 0cc559b775
Merge pull request #6820 from Icinga/bugfix/scheduled-downtime-ha-duplicates
Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones
2018-12-05 11:33:29 +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
Michael Friedrich 26f411638f
Merge pull request #6757 from Icinga/bugfix/no-more-notifications-recovery-filtered
Fix that no_more_notifications gets reset when Recovery notifications are filtered away
2018-12-05 11:05:44 +01:00
Michael Friedrich b6212e92fb
Merge pull request #6750 from davidtek/master
#6749 Wrong operator on stride variable causing incorrect behaviour
2018-12-05 11:05:05 +01:00
Michael Friedrich 15e3aa1762
Merge pull request #6786 from Icinga/feature/dsl-getenv
DSL: Implement getenv()
2018-12-04 16:08:37 +01:00
Michael Friedrich fd9b2dece1 Only create downtimes from non-paused ScheduledDowntime objects in HA enabled cluster zones 2018-12-04 15:20:37 +01:00
Alexander A. Klimov 7e630c7732 HttpServerConnection#DataAvailableHandler(): be aware of being called multiple times concurrently
refs #6816
2018-12-03 19:05:41 +01:00
Alexander A. Klimov 30e6d0f809 ThreadPool#Stop(): discard non-processed queue items 2018-12-03 16:38:52 +01:00
Michael Friedrich 5f25eb6b2d Add a code comment for connection: close handling 2018-12-03 14:40:50 +01:00
Sven Wegener a83dbc9de5 Restore 'Connection: close' behaviour in HTTP responses
Actually the `corked` functionality caused problems with
not closing connections properly.

Full Analysis: https://github.com/Icinga/icinga2/issues/6799#issuecomment-443710338

Full credits to @swegener :)

fixes #6799
2018-12-03 14:27:37 +01:00
Alexander A. Klimov 8de5326d23 Remove redundand check for object existence on creation via API
refs #3937
2018-11-29 17:51:53 +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 Insel b0cf92fd17 Fix deadlock in GraphiteWriter
This fixes a deadlock in the GraphiteWriter feature, which is visible
during the reload process. The reload thread waits for the
GraphiteWriter to finish, but the GraphiteWriter can't finish because
it's stuck in `SendMetric()` waiting for a lock which is hold by the
reload thread.
2018-11-12 20:12:40 +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
Michael Friedrich d082e8c1b1 Fix that no_more_notifications gets reset when Recovery notifications are filtered away
Hello from the OSMC hackathon :)
2018-11-08 12:13:32 +01:00
David Lublink a02b7ac155 * BugFix : Wrong operator on stride variable causing incorrect behaviour ( #6749 ) 2018-11-01 18:51:42 -04:00
Michael Insel b785674ab2 Fix api setup to automatically create the conf.d directory
This patch creates the conf.d directory automatically when it is not present during api setup.
2018-11-01 19:16:26 +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 c0c6ea545b DB IDO: Don't enqueue queries when the feature is paused (HA)
fixes #5876
refs #6739
2018-10-30 13:17:28 +01:00
Michael Friedrich 680103f111
Merge pull request #6709 from ekeih/bugfix/icinga2-version-check-6703
Fix the Icinga2 version check for versions with more than 5 characters
2018-10-29 13:46:36 +01:00
Michael Friedrich 3d45d0bcf6 Minor styleguide 2018-10-29 13:45:18 +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
Lee Clemens 6418af3f01 dbido: remove redundant mysql indexes 2018-10-26 18:32:21 -04:00
Michael Friedrich b40a568cd9
Merge pull request #6726 from Icinga/bugfix/ido-debug-log
Silence the debug log a bit for IDO events
2018-10-24 16:11:38 +02:00
Michael Friedrich 108b85427c Silence the debug log a bit for IDO events
They're actually not processed when the feature is paused,
and I have already seen them in user's logs when analysing why
objects are not updated or notifications sent. 'DbEvents' isn't
related to rather 'DB IDO' and is confusing.
2018-10-24 16:01:57 +02:00
Michael Friedrich 028946a1cc Implement HA functionality for Perfdata feature 2018-10-24 14:42:52 +02:00
Michael Friedrich 97c1296e99 Implement HA functionality for OpenTsdb feature 2018-10-24 14:42:46 +02:00
Michael Friedrich b905999f4b Implement HA functionality for Gelf feature 2018-10-24 13:50:10 +02:00