Commit graph

1532 commits

Author SHA1 Message Date
Lord Hepipud
37596459ab Fix array handling on log analyser; Adds timestamp 2021-05-28 21:09:16 +02:00
Lord Hepipud
7ddc77c494
Merge pull request #249 from Icinga:feature/rewrite_exception_handler
Feature: Rewrite exception handler

Improves internal exception handler to get rid if misplaced `:` and adds all fields properly
2021-05-28 21:08:40 +02:00
Lord Hepipud
71f54b29e7
Merge branch 'master' into feature/rewrite_exception_handler 2021-05-28 21:08:17 +02:00
Lord Hepipud
42626dab45 Rewrite exception handler 2021-05-28 21:06:33 +02:00
Lord Hepipud
3ceaa22646
Merge pull request #247 from Icinga:feature/rewrite_plugin_execution
Feature: Re-Write execution of checks

We re-dessigned the handling on how checks are executed internally, to make configuration, extension and adding future features even more easier.

What is new:
* Allows to specify generic % values for thresholds, in case you added the `BaseValue` argument with the basic value for your input value to compare them as % for each other: `New-IcingaCheck -BaseValue $partition.Size`
* Allows to check for defined thresholds intervalls by the Icinga for Windows daemon, by adding `-ThresholdInterval 15m` for example to your check execution: `Invoke-IcingaCheckCPU -ThresholdInterval 1m -Warning 60%`
* Values of output data which are defined as Bytes, seconds or anything related will now always be properly translated for better readability
* Provided translations for example service states are anything related are improvement and will always apply now
* There is an optional `-AddSummary` header available, which now adds in addition to the current package header the number of Unknown, Critical, Warning or Ok services (requires Plugin update)
* In case a check is not ok, it will not added to the first package including the current value of the check for better overview
* The check functions `SetOk()`, `SetWarning()`, `SetCritical()`, `SetUnknown()` for `New-IcingaCheck` now support a input message as first value to print informations on why the check is in this state, including a `bool` value as second argument, which will look the entire check object in this state, making it unmodifyable in case it is set to `$TRUE`: `$check.SetUnknown('Your partition could not be read', $TRUE) | Out-Null`
2021-05-28 21:02:09 +02:00
Lord Hepipud
a9126ce402 Re-Write execution of checks 2021-05-28 20:08:23 +02:00
Lord Hepipud
b782d44242
Merge pull request #256 from Icinga:fix/director_self_service_api_wizard
Fix: Self Service for removed hosts/keys inside Icinga Director

Fixes error while using Icinga Director Self-Service API, in case the host or host API key was deleted inside the Icinga Director and the installation wizard was called with the correct template key, while the old host key was still present inside the Icinga for Windows configuration
2021-05-27 16:15:17 +02:00
Lord Hepipud
7f10d34ff0 Fixes self service for removed hosts/keys 2021-05-27 14:13:25 +02:00
Lord Hepipud
0228d302ed Updates changelog 2021-05-25 13:10:17 +02:00
Lord Hepipud
221973a964
Merge pull request #245 from haxtibal/bugfix/find_pfx_cert
Fix loading certificate from .pfx file
2021-05-25 13:08:55 +02:00
Lord Hepipud
b6ce0c40e6
Merge pull request #236 from Icinga:feature/stop_icinga_agent_during_framework_upgrade
Feature: Stop Icinga Agent during Framework upgrade

In some rare cases it can happen that during the upgrade of the Icinga PowerShell Framework, files are still used caused by the Icinga Agent running in the background.
To remove this impact, we will now stop the Icinga Agent in case it is running before upgrading the Framework and starting the Icinga Agent again, in case it was started before.
2021-05-25 10:10:09 +02:00
Lord Hepipud
acb8cbaf5c Stops Icinga Agent during Framework upgrade 2021-05-25 10:09:14 +02:00
Lord Hepipud
476de7d9cc
Merge pull request #254 from Icinga/bugfix/make-exception-enums-not-plugin-specific
Bugfix: Make exception enums not plugin specific
2021-05-22 10:41:39 +02:00
Yonas Habteab
581e0d1a56 Make exception enums not plugin specific 2021-05-21 17:51:59 +02:00
Lord Hepipud
56c2ab4188
Merge pull request #252 from Icinga:fix/improve_module_error_handling
Feature: Inform the user if plugins are executed which are not meeting dependency requirements

Improve error handling on plugin execution by informing the user if the plugin is simply not installed or the entire module was not loaded because of errors or missing dependencies

Fixes #250
2021-05-21 11:37:31 +02:00
Lord Hepipud
47203d39c5 Feature: Inform the user if plugins are executed which are not meeting dependency requirements
Fixes #250
2021-05-21 11:02:51 +02:00
Lord Hepipud
0a09d63cbd
Merge pull request #248 from Icinga/feature/improve_test_for_performance_counter_categories
Feature: Improve test if Performance Counter category exist

This will improve `Test-IcingaPerformanceCounterCategory` by creating an object for the Performance Counter category provided and checking if it is a valid object instead of relying on the registry which might not contain all categories in the correct language.
2021-05-21 09:38:41 +02:00
Lord Hepipud
19a6952cee Improve test if perf counter category exist 2021-05-19 15:24:48 +02:00
Lord Hepipud
d6f164410b
Merge pull request #233 from Icinga:feature/supress_console_output_except_for_plugin_data
Feature: Suppress other messages then plugin output

Adds feature to suppress any kind of console output except for plugin output and performance data, while Icinga for Windows is initialised with `Use-Icinga -Minimal`
2021-05-19 09:21:05 +02:00
Lord Hepipud
01b39ea514 Supress other messages then plugin output 2021-05-19 09:19:43 +02:00
Lord Hepipud
527b3951ba
Merge pull request #238 from Icinga:fix/Exit-IcingaExecutePlugin-throws-exception-for-localized-PerfCounters
Fix: Exit-IcingaExecutePlugin throws exception for localized PerfCounters

Encoding for REST-Api check calls was wrong during queue and while reading the result. We will now enfore UTF8 in both ways.

Fixes #232
2021-05-11 09:50:13 +02:00
Tobias Deiminger
91e37ea16c Fix loading certificate from .pfx file
If you tried this
 Use-Icinga; Get-IcingaSSLCertForSocket -CertFile "C:/my/cert.pfx"

the former code expanded like
 $FileType = Get-Item -Path "C:/my/cert.pfx";
 if ("cert.pfx" -eq '.pfx') { ... not reached ... }

and thus did not load the certificate file.

Now use GetExtension instead of Get-Item to make the .pfx check work.
2021-05-10 09:17:46 +02:00
Lord Hepipud
5f3d08ba84
Merge pull request #243 from Icinga:feature/add_stacktrace_for_plugin_execution_failure
Feature: Adds stacktrace for plugin runtime error

Adds StackTrace for exception output in case plugin execution fails.
2021-05-07 14:35:58 +02:00
Lord Hepipud
41f8b2a7e5 Adds stacktrace for plugin runtime error 2021-05-07 14:34:39 +02:00
Lord Hepipud
0b6e2235ed Exit-IcingaExecutePlugin throws exception for localized PerfCounters
Fixes #232
2021-05-04 17:36:31 +02:00
Lord Hepipud
eb5dd020b5
Merge pull request #241 from Icinga:feature/force_new_tls_versions_on_rest_api_checks
Feature: Force new TLS version for REST

Ensures we use TLS 1.1 and 1.2 for REST-Api calls, as used certificates in general are created with these.
2021-05-04 17:34:32 +02:00
Lord Hepipud
bcb24e088a Force new TLS version for REST 2021-05-04 17:33:39 +02:00
Lord Hepipud
566a64cc6c
Merge pull request #240 from Icinga:fix/adds_missing_wmi_service_information
Fix: Adds missing attributes for services

While filtering for certain services with `Get-IcingaServices`, there were some attributes missing from the collection. These are now added resulting in always correct output data.
2021-05-04 15:06:41 +02:00
Lord Hepipud
7bd8dccff8 Fixes missing attributes for services 2021-05-04 15:05:24 +02:00
Lord Hepipud
15fae3d60b
Merge pull request #239 from Icinga:feature/hide_securestring_customfields_values
Feature: Hide SecureString CustomFields input in Icinga Director

Adds feature to mask CustomField input values with `*` within the Icinga Director, in case the argument is defined as `SecureString`. Please ensure to read the [upgrading docs](https://icinga.com/docs/icinga-for-windows/latest/doc/30-upgrading-framework/) carefully, before importing new configurations.

Fixes #229
2021-05-04 10:42:02 +02:00
Lord Hepipud
c9f657a413 Adds feature to hide SecureString in Director 2021-05-04 10:38:54 +02:00
Lord Hepipud
7697b6b015
Merge pull request #235 from Icinga:feature/add_eventlog_analyzer_cmdlet
Adds Cmdlet for analysing EventLog content

Adds new Cmdlet `Show-IcingaEventLogAnalysis` to get a better overview on how many log entries are present within the EventLog based on hour, minute and day average/maximum for allowing a more dynamic configuration for `Invoke-IcingaCheckEventLog`
2021-04-28 15:25:13 +02:00
Lord Hepipud
89764e5ba5 Adds Cmdlet for analysing EventLog content 2021-04-28 15:23:30 +02:00
Lord Hepipud
d7a1745e39
Merge pull request #234 from Icinga:feature/allow_custom_exception_list_for_icinga_exceptions
Adds support to allow custom exception lists
2021-04-28 09:45:52 +02:00
Lord Hepipud
48d2249605 Adds support to allow custom exception lists 2021-04-28 09:44:40 +02:00
Lord Hepipud
8eb8467dad Updates changelog 2021-03-10 08:36:35 +01:00
Lord Hepipud
4909f87708 Fixes ConvertTo-IcingaSecureString exceptions 2021-03-10 08:32:55 +01:00
Lord Hepipud
87f7fec085 Updates version to v1.5.0 2021-03-10 08:31:12 +01:00
Lord Hepipud
4a4ca73594 Updates version to v1.4.1 2021-03-10 07:54:02 +01:00
Lord Hepipud
637d06e05d Fix memory leak on background service daemon 2021-03-10 07:52:55 +01:00
Lord Hepipud
20a4c8d4d3 Fixes ConvertTo-IcingaSecureString exceptions 2021-03-10 07:52:35 +01:00
Lord Hepipud
a504aa3704
Merge pull request #217 from bieba/master
fixes new-item asking for input type
2021-03-01 16:16:33 +01:00
Lord Hepipud
ccf00b5fff Updates changelog and upgrading docs 2021-03-01 14:19:29 +01:00
bieba
c69a6baf4e
fixes new-item asking for input type 2021-03-01 13:07:24 +01:00
Lord Hepipud
e81b2f6356
Merge pull request #215 from Icinga:fix/command_argument_parsing_used_wrong_variable
Fix: Wrong variable used for API check request
2021-03-01 12:39:07 +01:00
Lord Hepipud
33aca914b4 Fixes wrong variable used for API check request 2021-03-01 12:38:35 +01:00
Lord Hepipud
2ae5aff7cf
Merge pull request #214 from Icinga:fix/race_condition_exception_for_plugin_execution
Fix wrong plugin not installed unknown checkresult

Unknown checks for the plugin handler were called to soon, as the minimal configuration does not load old check commands for the plugins.
In addition API checks did not throw an unknown and were not catched properly
2021-03-01 12:08:59 +01:00
Lord Hepipud
e7c341e30a Fix wrong plugin not installed unknown checkresult 2021-03-01 12:07:57 +01:00
Lord Hepipud
ed43260bec Changelog update 2021-03-01 11:17:53 +01:00
Lord Hepipud
b9eb54d9ce
Merge pull request #213 from Icinga:feature/icinga_for_windows_management_console
Feature: Adds experimental Feature "Management Console"

Adds new experimental feature `Management Console` for better and easier management for Icinga for Windows and improved automation and deployed.

In addition following changes were made:
* Added support to fetch network interface for `Register-IcingaDirectorSelfServiceHost` directly from provided director url
* Added support for Icinga Framework Code Cache file being deleted once the feature is disabled
* Added support to suppress any console output for the current PowerShell session by using `Disable-IcingaFrameworkConsoleOutput` and to enable it again by using `Enable-IcingaFrameworkConsoleOutput`
* Added support for `-Release` argument for `Get-IcingaFrameworkServiceBinary` suppressing questions and using GitHub as source directly if set
* Added support to color console output by using `Write-IcingaConsolePlain` with the new argument `-ForeColor`
* Added new feature to write Icinga for Windows console headers more easily, better structured and formatted with `Write-IcingaConsoleHeader` by adding line content as array elements
* Fixed possible crash on `Get-IcingaAgentFeatures` if PowerShell is not running as administrator and therefor the command `icinga2 feature list` can not be processed
* Fixed `ConvertTo-IcingaSecureString` to return `$null` for empty strings instead of throwing an exception
2021-03-01 11:17:12 +01:00