Commit Graph

12499 Commits

Author SHA1 Message Date
Iustin Pop 8509e55b78 Improve check_dns command when used with monitoring-plugins 2.3
Version 2.3 of monitoring plugins did two things:

- change how multiple addresses are expected; no longer a single
  argument, with comma separated values, but repeated "-a" argument;
  sadly this is incompatible change, and configs need to be changed
  manually; this is commit
  monitoring-plugins/monitoring-plugins@a03068743f;
- add a "-L" argument that requires all passed addresses to be
  matched, which allows for stronger validation (all vs. at least
  one); this is commit
  monitoring-plugins/monitoring-plugins@fd9a7d2e00;

Both of these were committed a long while ago (2018), but were only
released very recently, in the 2.3 release (December 2020).

I've tried to make the descriptions as good as I could, but not sure
they're very readable, feedback welcome.

Signed-off-by: Iustin Pop <iustin@k1024.org>
2021-01-18 18:10:33 +01:00
Yonas Habteab 5b0bbd6351 IcingaDB: Check whether or not cr is nullptr 2021-01-18 11:38:31 +01:00
Alexander Aleksandrovič Klimov b8e0d23164
Merge pull request #8597 from Icinga/probot/update-authors/master/a55c7d4b86cc9723aee078d3a4a81fcf70a4b788
Update AUTHORS
2021-01-15 17:56:30 +01:00
icinga-probot[bot] fe8b07ddc8
Update AUTHORS 2021-01-15 16:55:36 +00:00
Alexander Aleksandrovič Klimov a55c7d4b86
Merge pull request #8568 from yayayayaka/feature/itl-check-systemd
ITL: Add systemd CheckCommand
2021-01-15 17:55:28 +01:00
Edgar Fuß 718ebe3cbd Avoid name clashes on case-insensitive file systems
On case-insensitive file systems (i.e. macOS), the VERSION file collides with the Boost-provided version file on #include <version>.

Work around by re-naming VERSION to ICINGA2_VERSION.
2021-01-15 17:46:16 +01:00
Julian Brost e727675aaf Remove incorrect assertion in ConfigItem::ActivateItems
There is an assertion that after activating items, all these items are
active, which sounds reasonable at first. However, with concurrent API
queries, some of these could already be deleted and therefore be
deactivated again.
2021-01-15 16:40:07 +01:00
Julian Brost 88e5744d54 AddDowntime: return Downtime::Ptr instead of String containing the name
At numerous places in the code, something like this is performed:

    String name = Downtime::AddDowntime(...);
    Downtime::Ptr downtime = Downtime::GetByName(name);

However, `downtime` can be a `nullptr` after this as it is possible that
the downtime is deleted in between.

This commit changes the return type of `Downtime::AddDowntime` to return
a Downtime::Ptr instead of the full name of the downtime. `AddDowntime`
performs the very same `GetByName()` operation internally, but handles
the `nullptr` case correctly and throws an exception.
2021-01-15 16:34:48 +01:00
Lara bcaa7d6292 ITL: Add check_systemd
The [check_systemd.py](https://github.com/Josef-Friedrich/check_systemd)
plugin will report a degraded system to your monitoring solution. It
requires only the
[nagiosplugin](https://nagiosplugin.readthedocs.io/en/stable) library.
2021-01-15 13:27:25 +01:00
Alexander Aleksandrovič Klimov 986bedd9a0
Merge pull request #8594 from Icinga/feature/remove-upq-from-activate-items
Remove upq from ConfigItem::ActivateItems
2021-01-15 12:09:57 +01:00
Alexander Aleksandrovič Klimov 4063e39d5f
Merge pull request #8515 from Icinga/feature/update-ssl-context-after-accepting-new-connection-8501
API: Update the ssl context after each accepting incoming connection
2021-01-15 11:21:36 +01:00
Noah Hilverling 4554d3c50e
Merge pull request #8529 from Icinga/feature/fedora31
GitHub actions: drop Fedora 31
2021-01-15 09:28:36 +01:00
Yonas Habteab d27f533e5f ApiListener: Update the ssl cont after each accepting incoming connection 2021-01-14 18:40:20 +01:00
Yonas Habteab 057254695d Utility: Introduce new helper function Utility::GetFileCreationTime() 2021-01-14 18:39:14 +01:00
Alexander Aleksandrovič Klimov d82e4987bd
Merge pull request #8427 from Icinga/bugfix/fork-exit
StartUnixWorker(): don't exit() on fork() failure
2021-01-14 17:49:41 +01:00
Alexander Aleksandrovič Klimov c549a6657e
Merge pull request #8562 from Icinga/bugfix/fix-no-renotification-for-non-ok-state-changes-8545
Fix no re-notification for non OK state changes with time delay
2021-01-14 17:49:29 +01:00
Alexander Aleksandrovič Klimov 70b438a2bf
Merge pull request #8104 from Icinga/bugfix/remove-downtime-returns-wrong-status-7408
API: Display a correct status when removing a downtime
2021-01-14 17:49:00 +01:00
Alexander Aleksandrovič Klimov 3ebd44ce32
Merge pull request #8001 from Icinga/feature/documentation-time-zones-7069
Doc: clarify TimePeriod/ScheduledDowntime time zone handling
2021-01-14 17:23:55 +01:00
Alexander A. Klimov 28bd23824d Doc: clarify TimePeriod/ScheduledDowntime time zone handling
refs #7069
2021-01-14 16:49:08 +01:00
Alexander A. Klimov 931b9307ae StartUnixWorker(): don't exit() on fork() failure
... but let the caller handle the failure.

Not to stop working completely just because of fork() failure during a reload.
2021-01-14 13:40:18 +01:00
Alexander A. Klimov e1bc4d474f On check_timeout first send SIGTERM
... to allow check plugins to terminate gracefully.

refs #6162
2021-01-14 12:00:11 +01:00
Yonas Habteab 997ad86225 Fix no re-notification for non OK state changes with time delay 2021-01-14 11:54:25 +01:00
Alexander Aleksandrovič Klimov 5efe3e662c
Merge pull request #8025 from Icinga/bugfix/downtime-for-host-service-with-long-name-8022
ConfigObjectUtility::GetObjectConfigPath(): hash names of not already existing objects
2021-01-14 10:42:04 +01:00
Julian Brost a68d774f78
Merge pull request #8581 from bebehei/shell-exitcode
Shell exitcode
2021-01-14 09:56:21 +01:00
Julian Brost db30704d14
Merge pull request #8532 from Icinga/bugfix/do-not-override-error-codes-that-are-not-200
HTTP: Do not override status codes that are not 200
2021-01-14 09:34:04 +01:00
Yonas Habteab 066db5ef60 HTTP: Don't override status codes that are not OK 2021-01-13 18:56:56 +01:00
Julian Brost f12666c166
Merge pull request #8157 from Icinga/bugfix/temporary-files-5124
Clean up temp files
2021-01-13 15:45:29 +01:00
Julian Brost 0c6abc817b Remove upq from ConfigItem::ActivateItems
Since commit d9010c7b9f, ActivateItems no
longer uses the WorkQueue upq to perform tasks but instead performs
these locally. One instance of `upq.Join()`/`upq.HasExceptions()`
remained in the function, but I believe this was just missed when
removing the `upq.Enqueue()` call just before.

This commit removes the corresponding parameter and updates all call
sites accordingly.
2021-01-13 15:19:55 +01:00
Alexander Aleksandrovič Klimov 5a0118c6d8
Merge pull request #8442 from Icinga/bugfix/close-ebadf-8437
Close FDs based on /proc/self/fd
2021-01-13 10:59:15 +01:00
Alexander Aleksandrovič Klimov f1110eb321
Merge pull request #8591 from Icinga/bugfix/concurent-notification-send-and-delete
Fix crash when notifications are sent while the notification object is deleted
2021-01-13 10:58:37 +01:00
Alexander A. Klimov 68a0079c26 ConfigObjectUtility::GetObjectConfigPath(): hash names of not already existing objects
... to avoid too long file names.

refs #8022
2021-01-12 18:03:22 +01:00
Alexander A. Klimov 450b2117d2 Add ".tmp" to state and modified attributes temp files
refs #5124
2021-01-12 17:35:29 +01:00
Alexander A. Klimov 18c2dae941 Clean up temp files
refs #5124
2021-01-12 17:35:29 +01:00
Alexander A. Klimov 26c944125b Close FDs based on /proc/self/fd
... not to waste time with close(2)ing RLIMIT_NOFILE-3 non-existing FDs.

Newer kernel = higher RLIMIT_NOFILE = more time wasted

refs #8437
2021-01-12 17:32:28 +01:00
Julian Brost aea06a27dc Use reference-counted pointer in notification callback
`this` could be deleted after `Notification::BeginExecuteNotification`
exited and before `Notification::ExecuteNotificationHelper` finished.
This is fixed by constructing a `Notification::Ptr` and operate on that
one as it is properly reference-counted.
2021-01-12 17:19:29 +01:00
Julian Brost 5f548c8f89
Merge pull request #8431 from Icinga/feature/windows-lower-fqdn-7407
Windows agent: Default to lower case FQDN
2021-01-12 12:44:58 +01:00
Alexander Aleksandrovič Klimov a6af5406f7
Merge pull request #8083 from Icinga/feature/Implement-new-API-events-7974
Implement new API event streams response
2021-01-12 12:26:05 +01:00
Yonas Habteab 756abbb2ff ApiEvents: Implement new API event streams response 2021-01-11 14:59:48 +01:00
Alexander Aleksandrovič Klimov 8b20a139c5
Merge pull request #8582 from widhalmt/doc/check_logstash
Update URLs of check_logstash plugin
2021-01-11 13:49:36 +01:00
Alexander Aleksandrovič Klimov d996d1e201
Merge pull request #8580 from bebehei/typo
Fix typo seemless -> seamless
2021-01-11 13:45:08 +01:00
Alexander Aleksandrovič Klimov 635a8c5d4c
Merge pull request #8088 from Icinga/bugfix/log-two-nodes-run-on-different-versions-8075
Display logmessage if two nodes run on different versions
2021-01-11 12:30:30 +01:00
Alexander Aleksandrovič Klimov 862add5f3f
Merge pull request #8512 from Icinga/bugfix/zombie-processes
Revert "icinga2 daemon: reap remaining child processes after reload"
2021-01-11 11:38:20 +01:00
Julian Brost 0276c0b052 Properly handle service downtime referencing a deleted host
Only two out of three cases were handled properly by the code: host
downtimes referencing a deleted host and service downtimes referencing a
deleted service worked fine. However, if a service downtime references a
deleted host, `Host::GetByName()` returns `nullptr` which isn't
accounted for. Use `Service::GetByNamePair()` instead as this performs a
check for the host being null internally.
2021-01-08 11:12:15 +01:00
Thomas Widhalm adb1e0ca84 Update URLs of check_logstash plugin 2020-12-28 17:16:07 +01:00
Benedikt Heine a71c105335 Run shellcheck over initscripts
Mainly quoting all variables
2020-12-27 16:57:23 +01:00
Benedikt Heine ebb2ec7e92 Use tabs for indentation
Except for the switch case, the script was written with tab indentation.
With tabstop of 4 spaces, the indentation in the switch case would make
sense, but I assume this is just a glitch of the editor.
2020-12-27 16:34:02 +01:00
Benedikt Heine d4251ea5ca Exit from script instead of subshell on missing user
When executing `false || (echo bad; exit 1)`, the call to `exit` won't
exit the script, it will only exit the subshell and the exit code will
be stored in the return code `$?`.

Since this is an error, we have to exit the script properly.
2020-12-27 16:29:37 +01:00
Benedikt Heine 8a455e8150 Fix typo seemless -> seamless 2020-12-25 23:27:08 +01:00
Alexander Aleksandrovič Klimov cb25be2d12
Merge pull request #8579 from Icinga/probot/update-authors/master/41ef094ab33d5e5cae2e8ab2cd63662fb73b6345
Update AUTHORS
2020-12-23 14:31:06 +01:00
icinga-probot[bot] 6fd4efc8dd
Update AUTHORS 2020-12-23 13:26:59 +00:00