Commit Graph

12900 Commits

Author SHA1 Message Date
Julian Brost 13ea635188 Don't trigger a fixed downtime like a flexible one
When creating a fixed downtime that starts immediately while the checkable is
in a non-OK state, previously the code path for flexible downtimes was used to
trigger this downtime. This is fixed by this commit which resolves two issued:

1. Missing downtime start notification: notifications work differently for
   fixed and flexible downtimes. This resulted in missing downtime start
   notifications under the conditions described above.
2. Incorrect downtime trigger time: this code path would incorrectly assume the
   timestamp of the last checkable as the trigger time which is incorrect for
   fixed downtimes.
2021-12-14 11:02:40 +01:00
Julian Brost cbbaf4eac8
Merge pull request #9122 from Icinga/bugfix/downtime-trigger-time
Set downtime trigger time deterministically
2021-12-13 14:08:23 +01:00
Julian Brost c71029f2e8 Set downtime trigger time deterministically
When triggering a downtime, the time of the causing event is now passed on as
the trigger time. That time is:

* For fixed downtimes: the later one of start and entry time.
* If a check result triggers the downtime: The execution end of the check
  result.
* If another downtime triggers the downtime: The trigger time of the first
  downtime.

This is done so two nodes in a HA setup can write consistent Icinga DB downtime
history streams.

refs #9101
2021-12-08 14:15:50 +01:00
Alexander Aleksandrovič Klimov fd864d1d0c
Merge pull request #9121 from Icinga/probot/update-authors/master/2727aee4b9bb9754279531b65ad75cf620717fd2
Update AUTHORS
2021-12-07 23:41:48 +01:00
Alexander Aleksandrovič Klimov 1417a2f9ac
Merge pull request #9118 from Icinga/probot/sync-changelog/31c564182a598e05bd59e3524ac4c89b65b8a092
CHANGELOG.md: add v2.13.2
2021-12-07 17:15:56 +01:00
icinga-probot[bot] b19f2ffeae
Update AUTHORS 2021-12-07 15:41:48 +00:00
Alexander Aleksandrovič Klimov 2727aee4b9
Merge pull request #9115 from Icinga/Al2Klimov-patch-4
Update .mailmap
2021-12-07 16:41:24 +01:00
Alexander Aleksandrovič Klimov 577cf94b59
Merge pull request #8956 from Icinga/Al2Klimov-patch-3
Fix IDO MySQL schema version
2021-12-07 15:31:00 +01:00
Rostislav Opocensky e05128fa3c
pass nwc_health check SNMPv3 args only if needed (#9095)
* pass nwc_health check SNMPv3 args only if needed

check_nwc_health fails if any of the SNMPv3 arguments were passed but
the SNMP version 3 protocol was not requested.

For instance the following works:

	check_nwc_health --hostname 192.0.2.3 --mode cpu-load \
		--protocol 1 --community public

While the following plugin invocation results in an error:

	check_nwc_health --hostname 192.0.2.3 --mode cpu-load \
		--protocol 1 --community public \
		--username joe --authpassword xxx

The superfluous SNMPv3 arguments may easily get inherited e.g. from host
templates.

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") to strings
so both numbers and strings are correctly recognized.

* Revert "string()ify the result of macro() calls"

This reverts commit 3636b5b4ba.

Wrong method applied to the result of macro().

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") in the
set_if clauses of the nwc_health command arguments to strings.
Both numbers and strings are then correctly recognized as the
nwc_health_protocol argument.

* string()ify the result of macro() calls

Always convert results of macro("$nwc_health_protocol$") in the
set_if clauses of the nwc_health command arguments to strings.
Both numbers and strings are then correctly recognized as the
nwc_health_protocol argument.
2021-12-07 15:29:34 +01:00
Noah Hilverling 129eccd24c CHANGELOG.md: add v2.13.2 2021-12-07 11:48:15 +00:00
Alexander Aleksandrovič Klimov 31c564182a
Merge pull request #8990 from Icinga/bugfix/downtime-all-services-on-child-hosts
Fix scheduling of downtimes for all services on child hosts
2021-12-07 12:48:01 +01:00
Alexander Aleksandrovič Klimov 7cf55b74e1
Update .mailmap 2021-12-03 11:39:54 +01:00
Noah Hilverling 77eb7f4e1e
Merge pull request #9111 from Icinga/Al2Klimov-patch-8
GHA: Add Ubuntu impish
2021-12-03 11:23:52 +01:00
Alexander Aleksandrovič Klimov 90831dcbc1
GHA: Add Ubuntu impish 2021-12-02 16:48:58 +01:00
Alexander Aleksandrovič Klimov 978a72afa2
Merge pull request #9106 from Icinga/feature/avoid-copy-in-downtimes-timer
Downtime::DowntimesExpireTimerHandler: don't copy vector
2021-12-02 15:32:00 +01:00
Alexander Aleksandrovič Klimov 4919c8b189
Merge pull request #9104 from Icinga/Al2Klimov-patch-6
GHA: add Raspbian bullseye
2021-12-01 17:25:27 +01:00
Julian Brost 596fcdc123 Downtime::DowntimesExpireTimerHandler: don't copy vector
`ConfigType::GetObjectsByType<Downtime>()` already returns a
`std::vector<Downtime::Ptr>` so there is no point in copying it into another
vector of the same type just to then iterate the copied vector instead of the
original one.
2021-12-01 13:05:23 +01:00
Alexander A. Klimov 2a9f5f2e0f GHA: Raspbian: install more recent QEMU
to workaround "semop(1): encountered an error: Function not implemented".
2021-12-01 11:40:50 +01:00
Julian Brost d6a1757cb8
Merge pull request #9093 from Icinga/Al2Klimov-patch-7
GHA: add Fedora 35
2021-11-30 14:58:49 +01:00
Alexander Aleksandrovič Klimov 63a5938164
GHA: add Raspbian bullseye 2021-11-29 15:59:20 +01:00
Julian Brost 9e39866986
Merge pull request #9100 from Icinga/Al2Klimov-patch-4
Put `-latomic` to the other `-l`s
2021-11-25 11:38:46 +01:00
Alexander Aleksandrovič Klimov 7270caf226
Put `-latomic` to the other `-l`s
to make it compiling on Raspberry Pi OS bullseye.
2021-11-23 16:19:05 +01:00
Alexander Aleksandrovič Klimov c4c51a2b56
Merge pull request #8963 from Icinga/bugfix/git-describe-escapes-to-parent-dirs
third-party: update GetGitRevisionDescription CMake module
2021-11-23 12:22:47 +01:00
Yonas Habteab 361807f7a9
Adjust incosistent pki log messages (#8965) 2021-11-22 16:06:55 +01:00
Yonas Habteab a64089ffc1
`ClassCompiler`: Don't allow to define an int as a group name in `groups` attr (#9057) 2021-11-22 14:02:50 +01:00
Julian Brost d09925189a
Merge pull request #9037 from Icinga/Al2Klimov-patch-4
InfluxdbCommonWriter#Flush(): fix log message
2021-11-19 17:09:05 +01:00
Julian Brost da08d970cc Document which other downtimes are deleted by /v1/actions/remove-downtime 2021-11-19 14:47:07 +01:00
Julian Brost 8cde21ddfd
Merge pull request #9092 from Icinga/bugfix/non-unity-build
Add missing include to fix non-unity builds
2021-11-19 13:47:48 +01:00
Julian Brost 16d1ddb87f
Merge pull request #9052 from Icinga/bugfix/github-actions-windows-builds-don-t-abort-if-installing-dependencies-fails-8935
doc/win-dev.ps1: actually utilize ThrowOnNativeFailure
2021-11-19 13:47:29 +01:00
Alexander Aleksandrovič Klimov 2aa0078663
GHA: add Fedora 35 2021-11-18 12:35:52 +01:00
Henrik Triem 6e40f3f11e
Merge pull request #9091 from Icinga/Al2Klimov-patch-6
GHA: drop Fedora 33
2021-11-17 18:00:04 +01:00
Julian Brost 2ad0a4b8c3 Add missing include to fix non-unity builds
This commit fixes the following build error:

    [ 55%] Building CXX object lib/icinga/CMakeFiles/icinga.dir/usergroup.cpp.o
    lib/icinga/usergroup.cpp:79:24: error: incomplete type ‘icinga::Notification’ used in nested name specifier
       79 | std::set<Notification::Ptr> UserGroup::GetNotifications() const
          |                        ^~~
2021-11-17 16:11:15 +01:00
Alexander Aleksandrovič Klimov f0b6ef14e9
GHA: drop Fedora 33
It's EOL.
2021-11-16 10:48:31 +01:00
Feu Mourek e1c6c9eb19
Add documentation about Icinga 2 use cases (#9065)
Added examples about different kind of use cases that will help users get a better picture of Icinga.
2021-11-15 17:51:37 +01:00
Noah Hilverling 4d3b1709fd
Merge pull request #9009 from Icinga/bugfix/icingadb-runtime-updates-delete-relationships
Icinga DB: Make sure object relationships are handled correctly during runtime updates
2021-11-12 17:52:59 +01:00
Noah Hilverling e681914d83
Merge pull request #9086 from Icinga/bugfix/icingadb-log-queries-debug-level
Icinga DB: only log queries at debug level
2021-11-12 17:16:54 +01:00
Julian Brost b9e6273ba0 Icinga DB: only log queries at debug level 2021-11-12 15:41:17 +01:00
Noah Hilverling 7a0796061a IcingaDB::AddObjectDataToRuntimeUpdates(): Copy data before modifying 2021-11-12 13:34:57 +01:00
Noah Hilverling 10bde2075a Dictionary: Make sure underlaying map is ordered 2021-11-12 13:34:57 +01:00
Noah Hilverling 73e0d6e61b Icinga DB: Make sure object relationships are handled correctly 2021-11-12 13:34:57 +01:00
Noah Hilverling 4e79eb080c
Merge pull request #9058 from Icinga/bugfix/icingadb-prefix-command_id
IcingaDB: Prefix command_id with command type
2021-11-11 11:50:26 +01:00
Noah Hilverling c1098bef35
Merge pull request #9061 from Icinga/add-downtime-duration-and-service-state-host-id-streams
Icinga DB: Add `downtime.duration` & `service_state.host_id` to Redis
2021-11-11 10:19:47 +01:00
Noah Hilverling 766bb2e546
Merge pull request #9018 from Icinga/feature/sync-checkables-states-first
Icinga DB: sync checkables along with their states first
2021-11-09 15:28:00 +01:00
Noah Hilverling a9c2304c61 IcingaDB: Prefix command_id with command type 2021-11-09 12:26:30 +01:00
Eric Lippmann 35053ac1dd Icinga DB: Sync groups earlier
Host and service groups are structural information that are used
for Web filters and should therefore be synchronized as soon as
possible.
2021-11-09 11:17:01 +01:00
Alexander A. Klimov 07c8440fd2 Icinga DB: sync checkables along with their states first
`WorkQueue#ParallelFor(x, false, y)` will enqueue x's items in FIFO order,
so x has to start with host and service.
2021-11-09 11:17:01 +01:00
Yonas Habteab fe5aa1e18d Icinga DB: Add `service_state.host_id` to Redis 2021-11-09 11:08:22 +01:00
Yonas Habteab 5dc45baebb Icinga DB: Add `downtime.duration` & `scheduled_duration` to Redis 2021-11-09 11:08:22 +01:00
Julian Brost 848f1ae167
Merge pull request #8998 from Icinga/bugfix/icingadb-program-start-milliseconds
Icinga DB: set value in milliseconds for program_start in stats/heartbeat
2021-11-08 18:18:19 +01:00
Julian Brost 524fe92a1d
Merge pull request #9028 from Icinga/bugfix/icingadb-zone-parent
IcingaDB: actually write parent to parent_id of zones
2021-11-08 18:08:48 +01:00