Commit graph

43 commits

Author SHA1 Message Date
Lord Hepipud
80b8d7e2f8 Fixes Metrics over Time on Windows 2012 R2 and older 2025-11-14 14:11:50 +01:00
Lord Hepipud
38461f755a Fixes UNKNOWN on checks using MoT thresholds if they are newly registered 2025-04-22 11:34:04 +02:00
Lord Hepipud
f5d9ac943c
Adds improved handling for Metrics over Time (#772)
This adds new and improved handling for Metrics over Time.

The overall execution time for the background tasks has been reduced, while also the memory management is way more efficient.

In addition to the improved core handling of the feature, performance metrics for metrics over time will NO LONGER BE WRITTEN.

This will increase the performance of the graphing solutions like InfluxDB a lot, while the monitoring by using the "-ThresholdInterval" argument is still possible.

```powershell
PS> Invoke-IcingaCheckCPU -Warning '5%' -ThresholdInterval '10m';
[WARNING] CPU Load [WARNING] Overall Load, Socket #0
\_ [WARNING] Overall Load: Value 6.546175% is greater than threshold 5% (10m Avg.) 
\_ [WARNING] Socket #0 
     \_ [WARNING] Core 0: Value 18.391566% is greater than threshold 5% (10m Avg.) 
     \_ [WARNING] Core 1: Value 14.100505% is greater than threshold 5% (10m Avg.)
     \_ [WARNING] Core Total: Value 6.546175% is greater than threshold 5% (10m Avg.)
| totalload::ifw_cpu::load=5.804053;5;;0;100 0_0::ifw_cpu::load=18.03764;5;;0;100 0_1::ifw_cpu::load=9.36611;5;;0;100 0_2::ifw_cpu::load=5.830669;5;;0;100 0_3::ifw_cpu::load=0.646737;5;;0;100 0_4::ifw_cpu::load=0.926955;5;;0;100 0_5::ifw_cpu::load=0.016205;5;;0;100 0_total::ifw_cpu::load=5.804053;5;;0;100
```
2025-01-29 14:45:53 +01:00
Lorenz Kästle
5c1f477926
Set maximum cache duration for service daemons to the right value (#759)
* Set maximum cache duration for service daemons to the right value

This commit sets the maximum duration for cached data for service
daemons to the proper amount.

Previously it was multiplied by 60, probably a typo from a time
when the assigned value was in minutes and not in seconds directly.

Therefore the value was 60 times to high which leads to a massive amount
of cached data which drags down the performance significantly.

* Updates changelog

---------

Co-authored-by: Lord Hepipud <contact@lordhepipud.de>
2025-01-24 16:48:22 +01:00
Lord Hepipud
f0c67d3a2b Adds support to TLS1.3 and improves startup response 2024-05-15 13:47:06 +02:00
Lord Hepipud
12c3790614 Fixes certificate handling to provide systemwide compatibility 2024-04-18 14:57:09 +02:00
Lord Hepipud
c691cb25e5 Fixes IfW API to properly read client streams complete, even when not fully send 2024-04-09 17:57:53 +02:00
Lord Hepipud
9d47bf1bec Fixes REST-Api while running as NT Authority\NetworkService 2024-04-03 14:44:54 +02:00
Lord Hepipud
03e60d4ca4 Adds renewal handling for Icinga for Windows certificate 2024-03-13 10:44:20 +01:00
Lord Hepipud
c3d3627634 Various memory leak fixes and improvements 2024-02-02 10:48:09 +01:00
Lord Hepipud
e96711efba Improves REST-Api memory management 2023-07-24 17:53:59 +02:00
Lord Hepipud
014aae1985 Fixes REST-Api to allow args with and without leading - 2023-07-24 12:04:11 +02:00
LordHepipud
fa79477790 Fixes error and exception handling over API checks 2023-07-19 17:48:21 +02:00
Lord Hepipud
ab0d3913c8 Fixes SecureString arguments not working with REST-Api 2022-08-27 13:07:28 +02:00
Lord Hepipud
ae01dbeb0a Rewrite PerfData Labels for multi output 2022-08-24 16:26:27 +02:00
Lord Hepipud
9a2e793be8 Fix GC collection on every REST connection 2022-04-06 13:59:31 +02:00
Tobias Deiminger
d215cfd568 Use a BlockingCollection to avoid busy loop in REST API threads
The former implementation had 5 threads permanently spinning fast
(10ms sleep) while waiting for a REST connection to process.
This causes higher load in general and it breaks systems where
"Turn on PowerShell Script Block Logging policy" is enabled,
because then each PS statement including Start-Sleep is logged -
resulting in 500 event log entries per second. It's a suggested
setting in some hardening guidelines.

We can easily replace the Queue with a BlockingCollection backed
by a ConcurrentQueue, which has the built-in feature to sleep until
there are new items. Now the REST API threads consumes zero CPU time
while waiting.
2022-03-30 11:13:03 +02:00
Lord Hepipud
e4ddbea4d6 Adds feature to detect frozen threads 2022-03-18 22:54:43 +01:00
Lord Hepipud
046074d468 Increase REST-Api default timeout from 30s to 120s 2022-03-18 17:41:37 +01:00
Lord Hepipud
c129bb627c Optimizes IMC and centralizes data 2022-02-04 16:11:02 +01:00
Lord Hepipud
954e69fde1 Reworks background daemon for JEA context 2022-01-28 21:06:18 +01:00
Lord Hepipud
586b55adc0 Improves show commands and extends Show-Icinga 2022-01-27 21:06:13 +01:00
Lord Hepipud
a23a40b23f Rewrite IfW service check daemon 2022-01-25 10:00:19 +01:00
Lord Hepipud
4ef55bddb4 Fixes lots of code styling, spelling and script analyzer
Disabling UseConsistentIndentation because it is not
properly working for multi-line commands with arguments
and array/hashtable objects
2022-01-14 22:26:53 +01:00
Lord Hepipud
5ed5f0b5e2 Fixes Icinga for Windows memory leak 2021-12-09 17:22:48 +01:00
Lord Hepipud
79d22ef127 Fixes Rest-Api address argument not being used 2021-11-16 16:28:00 +01:00
Lord Hepipud
495e0d05c3 Adds developer utilities 2021-11-07 12:10:05 +01:00
Lord Hepipud
253cb7f4dd Adds Rest-Api and Api-Checks into framework 2021-10-27 10:06:13 +02:00
Lord Hepipud
eb8ea9a497 Adds support for JEA profiles 2021-09-02 09:23:10 +02:00
Lord Hepipud
9f423d060f Fixes service daemon not working with arguments 2021-07-01 15:41:15 +02:00
Lord Hepipud
637d06e05d Fix memory leak on background service daemon 2021-03-10 07:52:55 +01:00
Lord Hepipud
c4f6fcc1fd Adds experimental Feature "Management Console" 2021-03-01 11:15:21 +01:00
Lord Hepipud
b9eca3a259 Fix background service daemon; fix memory leak 2021-02-23 10:58:03 +01:00
Lord Hepipud
b5d518dff9 Use non-shared globals for check results 2021-02-22 16:54:39 +01:00
Lord Hepipud
2b740785fe Replaces Write-Host calls with custom console writes 2020-05-13 16:53:15 +02:00
Lord Hepipud
c6e9da9783 Redesign of Service Check Daemon for lower CPU usage
Fixes #24
2019-11-23 10:20:37 +01:00
Lord Hepipud
9df17e1068 Fixes Service Check Background Daemon Memory leak
Fixes #20

This fixes the memory leak on the Service Check Background Daemon, mainly caused by not properly catching the boolean return values of `Add-IcingaHashtableItem`. The boolean values stayed within the scope, poluting the memory and causing functions to behave not as expected
2019-11-22 19:42:48 +01:00
Lord Hepipud
2c4d482e28 Add support for long-term caching of check metrics 2019-11-03 21:44:29 +01:00
Lord Hepipud
5276b7a505 Move service check daemon to proper location 2019-10-22 19:57:01 +02:00
Lord Hepipud
993defec04 Fixed error on removing hashtable cache content 2019-10-06 16:07:12 +02:00
Lord Hepipud
04af3a8503 Improved stability for service check execution daemon 2019-10-06 10:48:12 +02:00
Lord Hepipud
0e1940325a Fixed flushing of not required cached entries 2019-10-05 22:32:44 +02:00
Lord Hepipud
921dd8074b Added support for background daemon and check execution 2019-10-05 22:07:02 +02:00