Commit Graph

5676 Commits

Author SHA1 Message Date
Alexander Aleksandrovič Klimov ca9ce92b69
Merge pull request #8698 from Icinga/feature/icingadb-cache-environment-id
Icinga DB: cache environment ID instead of recomputing it every time
2021-03-26 17:16:42 +01:00
Alexander Aleksandrovič Klimov 0ee93754ee
Merge pull request #8691 from Icinga/bugfix/retry-rename-on-windows
Retry file rename operations on Windows for some errors
2021-03-26 17:16:25 +01:00
Alexander Aleksandrovič Klimov 65a77d4955
Merge pull request #8702 from Icinga/bugfix/missing-iostream-include
Add missing #include <iostream>
2021-03-26 17:16:01 +01:00
Julian Brost 180132806f
Merge pull request #8696 from Icinga/feature/improve-redisconnection-write-performance
RedisConnection::WriteRESP: Use one asio::async_write instead of many
2021-03-26 12:36:44 +01:00
Julian Brost 8813b74c9f
Merge pull request #8693 from Icinga/bugfix/stringbuilder-malloc
PackObject(): avoid one malloc()
2021-03-25 18:02:12 +01:00
Julian Brost b34818d3fc Add missing #include <iostream>
Fixes the following build error:

    /home/jbrost/dev/icinga2/lib/base/stdiostream.cpp: In member function ‘virtual size_t icinga::StdioStream::Read(void*, size_t, bool)’:
    /home/jbrost/dev/icinga2/lib/base/stdiostream.cpp:28:15: error: invalid use of incomplete type ‘std::iostream’ {aka ‘class std::basic_iostream<char>’}
       28 |  m_InnerStream->read(static_cast<char *>(buffer), size);
          |               ^~
2021-03-25 11:30:02 +01:00
Noah Hilverling 5c8b32618c RedisConnection::WriteRESP: Use one asio::async_write instead of many 2021-03-24 13:14:01 +01:00
Alexander A. Klimov 9531de3835 JsonEncode(): serialize integers w/o trailing .0
... so Icinga DB can parse them as integers.
2021-03-23 17:52:37 +01:00
Julian Brost 41f7124692 Icinga DB: cache environment ID instead of recomputing it every time 2021-03-23 17:09:32 +01:00
Alexander A. Klimov 070b4f9d06 Drop StringBuilder 2021-03-23 13:13:47 +01:00
Alexander A. Klimov f89f35c798 PackObject(): avoid one malloc()
... for performance reasons.
2021-03-23 13:13:47 +01:00
Julian Brost 05c8e7f36f Retry file rename operations on Windows for some errors 2021-03-23 09:54:01 +01:00
Alexander Aleksandrovič Klimov 9830dc194b
Merge pull request #8688 from Icinga/feature/sha1-without-sprintf
Speed up SHA1 function by removing calls to sprintf
2021-03-22 18:46:08 +01:00
Alexander Aleksandrovič Klimov 1c0ce89cb3
Merge pull request #8681 from Icinga/bugfix/problem-notification-at-downtime-end
Send problem notifications after downtime end for checkables in child zones
2021-03-22 17:56:25 +01:00
Julian Brost 2a2229a49b Don't use sprintf for SHA1 to hex conversion 2021-03-19 10:31:01 +01:00
Alexander Aleksandrovič Klimov ef8619f76b
Merge pull request #8601 from Icinga/feature/replace-std-boost-bind-with-lambdas-7006
Feature: Replace std/boost::bind() with lambdas
2021-03-18 17:56:13 +01:00
Julian Brost 29727e06c0 Only handle event::SetSuppressed{Notifications,NotificationTypes} within the local zone
Note that even when passing `nullptr` as target zone to `RelayMessage()`, the
cluster message will still be sent to the parent zone. These incoming messages
will now be rejected by the parent nodes. At the moment, there's no way to only
send within the local zone.
2021-03-17 15:05:12 +01:00
Yonas Habteab 43ba2da39c Replace std/boost::bind() function with lambda expression 2021-03-10 16:29:40 +01:00
Alexander A. Klimov 31dacb8390 IcingaDB#UpdateAllConfigObjects(): don't modify map concurrently 2021-03-08 18:11:24 +01:00
Julian Brost a4cf81194a
Merge pull request #8650 from Icinga/feature/icingadb-delta
Icinga DB: re-insert only changed object attributes
2021-03-08 15:11:21 +01:00
Alexander Aleksandrovič Klimov d169abc22c
Merge pull request #7968 from Icinga/bugfix/jsonrpcconnection-disconnect-log
JsonRpcConnection: always log errors
2021-03-08 10:55:55 +01:00
Julian Brost 02fd60934f
Merge pull request #8008 from Icinga/bugfix/ascii-tables-in-plugin-output-8006
PluginUtility::ParseCheckOutput(): if it doesn't look like perfdata, it's not perfdata
2021-03-05 17:19:38 +01:00
Alexander A. Klimov 4eddac0e64 Icinga DB: re-insert only changed object attributes 2021-03-04 17:29:39 +01:00
Alexander A. Klimov f60758dc7c JsonRpcConnection: always log errors 2021-03-04 16:23:07 +01:00
Alexander Aleksandrovič Klimov 618c778430
Merge pull request #8649 from Icinga/bugfix/icingadb-deduplicate-cvs
Icinga DB: HMSET the same fields only once
2021-03-03 16:57:27 +01:00
Alexander A. Klimov ed57d31400 Icinga DB: HMSET the same fields only once 2021-02-24 13:37:36 +01:00
Alexander A. Klimov d4a91ec50d Icinga DB: don't write all types 2021-02-17 12:41:45 +01:00
Alexander Aleksandrovič Klimov aa4f53009e
Merge pull request #8614 from Icinga/bugfix/runworker-exceptions
Improve handling of exceptions thrown by RunWorker
2021-02-08 16:22:35 +01:00
Julian Brost 54a8c7b434 Try to log useful information for exceptions thrown by RunWorker 2021-02-05 15:43:27 +01:00
Julian Brost ddbad7937d
Merge pull request #8622 from Icinga/bugfix/dependency-ti-typo-8180
dependency.ti: fix typo
2021-02-05 11:49:03 +01:00
Alexander A. Klimov ebfa73388f dependency.ti: fix typo
refs #8180
2021-02-04 18:29:54 +01:00
Alexander Aleksandrovič Klimov aa0baf6f69
Merge pull request #8099 from Icinga/feature/std-mutex
Use std::mutex, not boost::mutex
2021-02-04 10:19:04 +01:00
Alexander A. Klimov 9154aa17eb Fix missing include 2021-02-03 09:54:57 +01:00
Alexander A. Klimov c3388e9af6 Use std::mutex, not boost::mutex 2021-02-03 09:54:57 +01:00
Alexander Aleksandrovič Klimov dbdfe189c0
Merge pull request #7092 from Icinga/bugfix/command-escape-windows-4849
Fix Windows command escape for \"
2021-02-01 11:20:44 +01:00
Alexander Aleksandrovič Klimov 32cae11175
Merge pull request #8613 from Icinga/bugfix/ido-built-in-checkcommand-overrides-crit-with-warn-state
IdoCheckTask: Don't override checkable critical with warn state
2021-01-28 14:26:10 +01:00
Alexander Aleksandrovič Klimov ca52366a61
Merge pull request #8602 from Icinga/bugfix/icingadb-activation-priority
Delay start of IcingaDB until most config objects are activated
2021-01-28 10:01:37 +01:00
Alexander Aleksandrovič Klimov 9a867c2c25
Merge pull request #8513 from Icinga/bugfix/notifications-downtime-change-in-timeperiod-8509
FireSuppressedNotifications(const Notification::Ptr&): don't send notifications while suppressed by checkable
2021-01-28 10:01:23 +01:00
Julian Brost d7833a5977 Catch exceptions thrown by RunWorker on Windows
The same is already done on other platforms in line 529.
2021-01-27 15:48:28 +01:00
Alexander Aleksandrovič Klimov 8d1e958275
Make code doc more readable
Co-authored-by: Julian Brost <julian.brost@icinga.com>
2021-01-27 15:43:37 +01:00
Yonas Habteab 3e5dfa9607 IdoCheckTask: Don't override checkable critical with warn state 2021-01-27 13:27:14 +01:00
Julian Brost 9219f68c83
Merge pull request #8158 from Icinga/bugfix/check-source-passive-7948
Checkable#ProcessCheckResult(): don't overwrite check source
2021-01-26 10:49:55 +01:00
Alexander A. Klimov c3eba7e88d Checkable#ProcessCheckResult(): don't overwrite check source
... set by passive check results.

refs #7948
2021-01-25 16:05:03 +01:00
Alexander Aleksandrovič Klimov 91ffa89dad
Merge pull request #7918 from Icinga/feature/check-timeouts-sigterm-6162
On check_timeout first send SIGTERM
2021-01-21 16:11:07 +01:00
Alexander Aleksandrovič Klimov 124f98eed4
Merge pull request #8600 from Icinga/feature/flapping-ignore-unknown
Flapping: Allow to ignore states in flapping detection
2021-01-21 13:47:44 +01:00
Alexander Aleksandrovič Klimov b1719883a3
Merge pull request #8604 from Icinga/bugfix/icingadb-initial-sync-delay
IcingaDB: start initial dump in callback instead of timer
2021-01-21 13:47:12 +01:00
Alexander Aleksandrovič Klimov ef23ae5f3c
Merge pull request #8267 from efuss/passive_reach
Drop passive check results for unreachable hosts/services
2021-01-20 17:07:52 +01:00
Noah Hilverling e060995fd8 Flapping: Allow to ignore states in flapping calculation 2021-01-20 11:09:03 +01:00
Alexander Aleksandrovič Klimov 5e810f30a7
Merge pull request #8605 from Icinga/bugfix/icingadb-initial-sync-log
IcingaDB: wait for queries to be executed in inital sync
2021-01-20 10:47:46 +01:00
Julian Brost 2d080f14eb IcingaDB: start initial dump in callback instead of timer
Previously, the initial config dump was started in a timer executed
every 15 seconds. During the first execution of the timer, the Redis
connection is typically not established yet. Therefore, this delayed the
initial sync by up to 15 seconds.

This commit instead triggers the sync from a callback that is executed
after the connection is successfully established.

The timer is removed completely. On first glance, it looks like it would
ensure that a lost connection is reestablished, but this is handled
internally by RedisConnection. After the config has been dumped once,
that timer wouldn't ever attempt a reconnect anyways.
2021-01-20 09:31:27 +01:00