Commit Graph

12962 Commits

Author SHA1 Message Date
Yonas Habteab a0607aceff Fix compiler warnings don't move local variables 2022-02-22 17:51:43 +01:00
Alexander Aleksandrovič Klimov db321b9fcb
Merge pull request #9230 from Icinga/feature/installation-instructions
Update installation instructions for easier navigation on icinga.com
2022-02-21 16:38:42 +01:00
Alexander Aleksandrovič Klimov cf8923d628
Merge pull request #9016 from Napsty/nrpe-disable-logging
Add new check_nrpe parameter -D to disable logging to syslog
2022-02-21 12:19:56 +01:00
Julian Brost 5383df3c79
Merge pull request #9212 from Icinga/bugfix/multi-ido-notification-id
IDO: fix incorrect contacts in notification history with multiple IDO instances on a single node
2022-02-21 11:40:46 +01:00
Blerim Sheqa a759c1e451 Update installation instructions for easier navigation on icinga.com 2022-02-18 15:09:09 +01:00
Julian Brost 8e81faf3e0
Merge pull request #9221 from Icinga/bugfix/processcheckresult-dependency-deadlock
Prevent deadlock in ProcessCheckResult
2022-02-18 14:14:46 +01:00
Julian Brost 99008755b5
Merge pull request #9213 from Icinga/feature/icingadb-add-previous_soft_state-to-host_state-and-service_state-9210
IcingaDB: Add previous_soft_state to host_state and service_state
2022-02-18 14:09:35 +01:00
Julian Brost 3bb9cdb8cc Prevent deadlock in ProcessCheckResult
Without this commit, children and parents of a checkable were rescheduled on a
state change while holding the lock for the current checkable. If both ends of
a dependency are checked at the same time and both change state, they could end
up in a deadlock waiting for each other.

This commit fixes this problem by changing the code so that other checkables
are rescheduled only after releasing the lock for the current checkable.
2022-02-17 16:13:25 +01:00
Alexander A. Klimov c613e62454 IcingaDB: Add previous_soft_state to host_state and service_state
refs #9210
2022-02-14 11:32:46 +01:00
Julian Brost 7c9d0fff01 IDO: use per-instance notification_id in history
When there are multiple active IDO instances on the same node, before this
commit, all of them would share a single DbValue object for the notification_id
column of the icinga_contactnotifications table. This resulted in the issue
that one database references the notification_id in another database.

This commit fixes this by using a separate DbValue value for each IDO instance.
This needs a new signal as the existing OnQuery and OnMultipleQueries signals
perform the same queries on all IDO instances, but different queries are needed
here per instance (they only differ in the referenced DbValue). Therefore, a
new signal OnMakeQueries is added that takes a std::function which is called
once per IDO instance and can access callbacks to perform one or multiple
queries only on this specific IDO instance.
2022-02-10 16:36:35 +01:00
Alexander Aleksandrovič Klimov 8016b013ac
Merge pull request #9208 from Icinga/bugfix/gha-pin-windows-version
GitHub Actions: pin Windows Server version to 2019
2022-02-09 12:52:07 +01:00
Julian Brost 4c4731a461
GitHub Actions: pin Windows Server version to 2019 2022-02-04 14:09:52 +01:00
Alexander Aleksandrovič Klimov 948f70a175
Merge pull request #9203 from Icinga/probot/update-authors/master/d0c7dc86e1154e0233eb1e1a360bfc6a80d6c495
Update AUTHORS
2022-02-03 16:06:54 +01:00
Julian Brost 1b0ad099f1
Merge pull request #9154 from Icinga/bugfix/icingadb-reachabilitychangehandler-9143
Icinga DB: ensure is_reachable and severity don't miss updates
2022-02-03 14:53:51 +01:00
icinga-probot[bot] b767e92738
Update AUTHORS 2022-02-03 10:29:24 +00:00
Alexander Aleksandrovič Klimov d0c7dc86e1
Merge pull request #9197 from maggu/feature/db-extra-opts
ITL: Add --extra-opts parameter to the mysql and pgsql CheckCommand d…
2022-02-03 11:29:03 +01:00
Alexander A. Klimov 2ef3dd6a38 Checkable#ProcessCheckResult(): call Checkable::OnReachabilityChanged less often
Call it only on state changes to reduce no-op Redis/IDO updates a lot.

refs #9143
2022-02-03 11:12:53 +01:00
Alexander Aleksandrovič Klimov 74c98d338b
Merge pull request #9201 from Icinga/Al2Klimov-patch-6
GHA: drop CentOS 8
2022-02-02 16:06:59 +01:00
Alexander Aleksandrovič Klimov 0d5b733af6
GHA: drop CentOS 8
It's EOL.
2022-02-02 11:46:30 +01:00
Julian Brost 4491123f7f
Merge pull request #9198 from Icinga/Al2Klimov-patch-6
Doc: technical concepts: allow to change severity formula across Icinga 2 releases
2022-01-31 16:43:06 +01:00
Julian Brost 373ca14137
Merge pull request #9196 from Icinga/Al2Klimov-patch-4
Service#GetSeverity(): behave as the respective IDO query of Icinga Web
2022-01-31 16:35:49 +01:00
Alexander Aleksandrovič Klimov ff686792dd
Doc: technical concepts: allow to change severity formula across Icinga 2 releases
so nobody is surprised in that case.
2022-01-31 12:05:52 +01:00
C C Magnus Gustavsson a9b6b1dba0 ITL: Add --extra-opts parameter to the mysql and pgsql CheckCommand definitions 2022-01-31 11:40:04 +01:00
Alexander Aleksandrovič Klimov ff712f6b23
Service#GetSeverity(): behave as the respective IDO query of Icinga Web
which doesn't include host reachability.
2022-01-27 12:21:06 +01:00
Alexander A. Klimov 4c38715ef2 Checkable#ProcessCheckResult(): call Checkable::OnReachabilityChanged last
to ensure Checkable#IsReachable() returns correctly for dependency children inside OnReachabilityChanged().
That needs the dependency parent to be already in the correct state.

refs #9143
2022-01-25 13:33:46 +01:00
Alexander A. Klimov 84d09876b4 Icinga DB: ensure is_reachable and severity don't miss updates
refs #9143
2022-01-25 13:33:46 +01:00
Julian Brost 185fab3761
Merge pull request #9144 from Icinga/bugfix/icingadb-state-history
Icinga DB: don't write state history for ack/downtime/host problem changes
2022-01-20 12:00:24 +01:00
Alexander Aleksandrovič Klimov 711646a821
Merge pull request #9180 from Icinga/probot/update-authors/master/639091126244de83c8e8391bfd97523b96fd1015
Update AUTHORS
2022-01-19 15:25:46 +01:00
icinga-probot[bot] 8e13d37fbd
Update AUTHORS 2022-01-19 10:49:15 +00:00
Julian Brost 6390911262
Merge pull request #9123 from Icinga/bugfix/icinga2-crashes-when-sending-notifications-8186
Avoid "type" key in dicts being part of object state attrs
2022-01-19 11:48:40 +01:00
Alexander Aleksandrovič Klimov 30e1e8d3f4
Merge pull request #9152 from lrupp/patch-2
Additional GRANT options for MySQL
2022-01-19 10:39:16 +01:00
Julian Brost 463b159414
Merge pull request #9171 from Icinga/bugfix/icinga-db-notification-history-might-use-incorrect-previous_hard_state-9132
IcingaDB#SendSentNotification(): make stream deterministic via CheckResult#previous_hard_state
2022-01-18 16:54:16 +01:00
Julian Brost 31da6a56e6 Icinga DB: remove obsolete StateChangeHandler overload
This version of StateChangeHandler is no longer called anywhere as it was the
wrong function for all previous callers anyways.
2022-01-18 12:26:43 +01:00
Julian Brost cf73c6136b Icinga DB: make host problem change events update the state tables but not write state history
StateChangeHandler() is the function used when the actual hard/soft state
changes and thus also writes state history. This is not desired in this case,
instead, a runtime update should be generated, therefore call UpdateState()
instead.

refs #9063
2022-01-18 12:26:43 +01:00
Julian Brost 855e342b63 Icinga DB: make acknowledgement events update the state tables but not write state history
StateChangeHandler() is the function used when the actual hard/soft state
changes and thus also writes state history. This is not desired in this case,
instead, a runtime update should be generated, therefore call UpdateState()
instead.

refs #9063
2022-01-18 12:26:43 +01:00
Julian Brost f63268b0dd Icinga DB: make downtime events update the state tables but not write state history
StateChangeHandler() is the function used when the actual hard/soft state
changes and thus also writes state history. This is not desired in this case,
instead, a runtime update should be generated, therefore call UpdateState()
instead.

refs #9063
2022-01-18 12:26:43 +01:00
Julian Brost 447884be72 Icinga DB: don't reimplement volatile state update in SendConfigUpdate
Sending a volatile state update is already implemented in UpdateState, so just
use that function instead of generating the update queries.
2022-01-18 12:26:43 +01:00
Julian Brost a6d6cb788e Icinga DB: Merge SendStatusUpdate into UpdateState
Previously, both funktions did related operations but had unclear and confusing
naming:
- UpdateState updated the icinga:{host,service}:state Redis keys.
- SendStatusUpdate sent a runtime update for the icinga:{host,service}:state.

This commit merges both functions into one with a new mode parameter. The
following modes are now supported:
- Volatile: Update the icinga:{host,service}:state Redis key.
- Full: Perform the volatile state update and in addition send a corresponding
  runtime update so that this state update gets written through to the
  persistent database by a running icingadb process.
- RuntimeOnly: Special mode for callers that can ensure that a volatile update
  for the current state was already performed but has to be upgraded to a full
  update.

refs #9063
2022-01-18 12:26:43 +01:00
Alexander Aleksandrovič Klimov 506b7d9a35
Merge pull request #9172 from Icinga/feature/github-actions-windows-preinstalled-deps
GitHub Actions: Use preinstalled dependencies on Windows
2022-01-11 16:32:54 +01:00
Julian Brost 8e766a6a47 GitHub Actions: Use preinstalled dependencies on Windows
The Windows image provided by GitHub already includes most of our dependencies,
so the installation of all Chocolatey packages except winflexbison3 was
redundant. Visual Studio is provided in the Enterprise version instead of
Community, so that has to be added to the search path as well.
2022-01-11 13:20:07 +01:00
Alexander A. Klimov 1fee3f1b12 IcingaDB#SendSentNotification(): make stream deterministic via CheckResult#previous_hard_state
Now it gets everything from one source, the CheckResult.

refs #9132
2022-01-10 19:18:11 +01:00
Julian Brost 3d04b04172
Merge pull request #9138 from Icinga/bugfix/mysql-schema-versions
Make MySQL schema version in full schema file and upgrade files consistent
2022-01-10 09:54:38 +01:00
Julian Brost e518dc2436
Merge pull request #9112 from Icinga/bugfix/sync-missing-history-information
Icinga DB: ensure consistent history streams in HA setup
2022-01-07 15:14:06 +01:00
Julian Brost a99c04030c
Merge pull request #9150 from Icinga/bugfix/icingadb-cmd-arg-order-int
Icinga DB: ensure icinga:*command:argument#order is an int
2022-01-05 16:07:30 +01:00
Julian Brost 3e73a262cc Sync comment and downtime removal info for Icinga DB history
When a comment or downtime is removed manually, the name of the requestor and
timestamp have to be synced to other nodes in the cluster to allow all of them
to generate a consistent Icinga DB history stream.

refs #9101
2022-01-05 10:27:13 +01:00
Julian Brost 5017f5fa43
Merge pull request #9163 from Icinga/Al2Klimov-patch-3
Typos
2022-01-05 09:43:19 +01:00
Alexander Aleksandrovič Klimov fb60e20ec8
Typos 2022-01-04 18:17:54 +01:00
Alexander Aleksandrovič Klimov db9825cbaf
Merge pull request #9161 from Icinga/Al2Klimov-patch-3
GHA: drop SUSE 15.2 and add 15.3
2022-01-04 17:54:47 +01:00
Alexander Aleksandrovič Klimov 1b50d912a0
Merge pull request #9137 from Icinga/bugfix/influxdb-writer-synchronization
Fix unsafe concurrent access to m_DataBuffer in InfluxdbCommonWriter
2022-01-04 17:37:28 +01:00
Alexander A. Klimov e9e555468d Handle "type" key in dicts being part of object state attrs
i.e. the confusion of the state file deserializator with e.g. `"type":32` on startup.
That would unexpectedly restore (the now ignored) null (not `{"type":32}`) as there's no type "32".

refs #8186
2022-01-04 17:17:20 +01:00