Commit graph

1645 commits

Author SHA1 Message Date
Lord Hepipud
c88897e476
Merge pull request #436 from Icinga:fix/plugin_docs_generator_lookup
Fix: Plugin Doc generator file lookup

Fixes a lookup error for existing plugin documentation files, which caused files not being generated properly in case a similar name was already present on the system.
2022-01-23 13:12:00 +01:00
Lord Hepipud
2b61c297ea Fixes plugin doc generator file lookup 2022-01-23 13:11:21 +01:00
Lord Hepipud
3313976670
Merge pull request #428 from Icinga:feature/move_eventlog_from_application
Feature: Moves EventLog out of Application log for IfW

We will move the Icinga for Windows EventLog away from the current \`Application\` log and move it into a custom \`Icinga for Windows\` log, to ensure the \`Application\` log is not spammed with Icinga for Windows events.
2022-01-21 18:42:45 +01:00
Lord Hepipud
8244c2d440 Moves IfW EventLog out of Application log 2022-01-21 18:40:32 +01:00
Lord Hepipud
ba5517e13f
Merge pull request #434 from Icinga:fix/exception_inside_ise_session
Fix: Exception and freezes inside PowerShell ISE session

Fixes Icinga for Windows exception while running \`icinga\` commands or the Icinga Mangement Console inside an \`PowerShell ISE\` session, which behaves differently.

Instead, we now load Icinga for Windows and inform the user about limitations properly.
2022-01-20 18:17:53 +01:00
Lord Hepipud
43fd685126 Fixes exceptions and freezes inside ISE session 2022-01-20 18:15:08 +01:00
Lord Hepipud
b81a757701
Merge pull request #433 from Icinga/feature/update_gitignore
Feature: Updates .gitignore for Visual Studio
2022-01-16 00:19:50 +01:00
Lord Hepipud
cec2c1e732 Updates .gitignore for Visual Studio 2022-01-16 00:19:01 +01:00
Lord Hepipud
1316ddbb3a
Merge pull request #431 from Icinga:fix/code_styling_naming_scriptanalyzer
Fix: Code styling, spelling errors and PSScriptAnalyzer

Fixes lots of code styling, spelling and script analyzer issues.

Disabling UseConsistentIndentation because it is not properly working for multi\-line commands with arguments and array/hashtable objects.
2022-01-14 22:31:21 +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
ac7aad5e07
Merge pull request #430 from Icinga:fix/remove_restapi_warnings_and_experimental
Fix: Removes experimental for API Checks and module requirements

Fixes experimental state of \`API Check\` feature by removing that term and removing the requirement to install \`icinga\-powershell\-restapi\` and \`icinga\-powershell\-apichecks\`
2022-01-14 20:54:46 +01:00
Lord Hepipud
dd2d71ee07 Remove experimental for API Checks and module note 2022-01-14 20:53:16 +01:00
Lord Hepipud
bf8d6479a9
Merge pull request #419 from Icinga:fix/managed_user_lookup_time
Fix: Icinga Managed User lookup time

Fixes the lookup time if a user is managed by Icinga for Windows or not in large Active Directory environments, by using \`Get\-LocalUser\` instead.

This Cmdlet is available starting with PowerShell 5.0 and later and only required in general for running Icinga for Windows in JEA context. As JEA is only supported starting with PowerShell 5.0 or later, this will not cause any problems.

In case the command is executed on an older system without the \`Get\-LocalUser\` Cmdlet available, Icinga for Windows will handle all users tested with the new implementation as \`not\` managed by Icinga for Windows.
2022-01-14 20:00:57 +01:00
Lord Hepipud
7c019e7cd2
Merge pull request #426 from Icinga:feature/add_detailed_exception_report_feature
Feature: Adds exception report

Adds a new feature to EventLog writer, allowing to parse an exception report to identity the exact root cause and location, on where the error occurred in first place.
2022-01-13 00:04:14 +01:00
Lord Hepipud
008b4920f1 Adds exeception detail reporting 2022-01-13 00:03:10 +01:00
Lord Hepipud
45b832ac3d
Merge pull request #425 from Icinga:feature/allow_force_cert_creation_over_imc
Feature: Allow Force-Creation of certificates for Agent over IMC

Adds support to re\-create the Icinga Agent certificates, even when they are already present on the system. This will resolve the manual requirement to delete the folder or certificates, in case the Icinga CA changes for example
2022-01-04 21:55:51 +01:00
Lord Hepipud
46bcb914fc Adds support for cert force creation over IMC 2022-01-04 21:53:28 +01:00
Lord Hepipud
94d09c6b43
Merge pull request #424 from Icinga:fix/repository_sync_can_cause_invalid_json_exception
Fix: Sync-IcingaRepository can cause invalid JSON primitive

By using the \`Sync\-IcingaRepository\` function, it might happen that in case the parent site is returning a file listing instead of an error page, the downloaded \*\*repository\*\* file is only the list of the files and not the proper JSON repo file.

Instead we now check the result properly and fallback by adding \`ifw.repo.json\` as it was intended before.
2022-01-04 20:56:36 +01:00
Lord Hepipud
55a0ce4987 Fixes repo sync by properly checking result 2022-01-04 20:55:34 +01:00
Lord Hepipud
89fbb54b9d
Merge pull request #423 from Icinga:fix/version_splitting_return_object
Fix: Version splitting returns "mayor" instead of "major"

Fixes the output value from \`Split\-IcingaVersion\` by returning the object \`major\`  in addition to the wrong value \`mayor\`.

We will keep both outputs present for the moment, allowing developers to update their code.
2022-01-04 20:28:36 +01:00
Lord Hepipud
63f24399b8 Fixes version splitting by returning major object 2022-01-04 20:25:21 +01:00
Lord Hepipud
bca85efcb0
Merge pull request #422 from Icinga:fix/jea_profile_username_length
Fix: Username has no length cap for JEA installation

JEA profile installation can fail and cause the Icinga Agent to become defective, in case a username is used being longer than 20 digits.
2022-01-04 20:19:46 +01:00
Lord Hepipud
327bb13d32 Fixes maximum user length for JEA profiles 2022-01-04 20:14:59 +01:00
Lord Hepipud
7dc1ffc3c5 Fixes lookup time for Icinga managed user 2022-01-04 02:11:39 +01:00
Lord Hepipud
08cda55428
Merge pull request #418 from Icinga:fix/crash_on_wrong_variable_usage
Fix: Crash on wrong variable usage
2022-01-04 01:29:19 +01:00
Lord Hepipud
0ad5031e60 Fixes crash on wrong variable usage 2022-01-04 01:28:09 +01:00
Lord Hepipud
2bbea22648
Merge pull request #405 from Icinga:fix/garbage_collector_memory_leak
Fix: Icinga for Windows memory leak

In some scenarios, Icinga for Windows can contain a memory leak, caused by a bug of the Garbage Collector in older PowerShell versions.

We resolve this by enforcing a more aggressive approach on memory cleanup and by collecting all objects being used.
2021-12-09 17:24:37 +01:00
Lord Hepipud
5ed5f0b5e2 Fixes Icinga for Windows memory leak 2021-12-09 17:22:48 +01:00
Lord Hepipud
3163d9237c
Merge pull request #411 from Icinga/Fix_error_message_formating
Add missing parameters for format string
2021-12-08 17:29:24 +01:00
RincewindsHat
b1e2ef2052 Add missing parameters for format string 2021-12-08 17:22:50 +01:00
Lord Hepipud
a49a53204d
Merge pull request #410 from Icinga:fix/improve_test_for_add_type
Fix: Performance for Add-Type testing

With recent versions we added a feature to test if Add-Type functions are added to the current PowerShell session, ensuring that the same type is not re-added which caused errors on the error stack.

While the code works perfectly fine, it takes a long time for execution which causes the plugin `Invoke-IcingaCheckDiskHealth` for example, to take way longer than usual.

This PR prepares the future `Private` and `Public` section of the Icinga for Windows environment variables and adds an internal, quick test if a Add-Type function is already added to the current session, once being tested with the old behaviour.

This reduces the disk health plugin execution time after the first run from around 10 seconds to 2 seconds.
2021-11-25 13:16:36 +01:00
Lord Hepipud
32c4541397 Improves testing if Add-Type is already loaded 2021-11-25 13:12:57 +01:00
Lord Hepipud
2832383d22
Merge pull request #408 from Icinga:doc/updates_roadmap
Doc: Updates roadmap
2021-11-18 16:13:50 +01:00
Lord Hepipud
6d6f46c895 Updates roadmap 2021-11-18 16:12:49 +01:00
Lord Hepipud
452f8019de
Merge pull request #407 from Icinga:fix/remove_unnecessary_module_loading
Fix: Removes unnecessary module import

Removes not required import of PowerShell modules for `Invoke-IcingaNamespaceCmdlets`, as by the time we fetch the content the specified module must be loaded already.

In addition adds proper error output in case something goes wrong. Errors are written directly into the EventLog.
2021-11-18 15:45:26 +01:00
Lord Hepipud
f602b242b1 Removes unnecessary module import from namespace 2021-11-18 15:42:47 +01:00
Lord Hepipud
2ce536c95e
Merge pull request #404 from Icinga:fix/rest_api_listen_address
Fix: REST-Api address argument not being used

Fixes missing address attribute for REST-Api daemon, making it unable to change the listening address
2021-11-16 17:15:10 +01:00
Lord Hepipud
79d22ef127 Fixes Rest-Api address argument not being used 2021-11-16 16:28:00 +01:00
Lord Hepipud
3c9249444a
Merge pull request #403 from Icinga:fix/memory_leak_on_eventlog_reader
Fix: Memory leak on EventLog reader

With Icinga for Windows v1.7.0 we introdocued a way to read EventLog entries as stream directly into the CLI.
If used for a long time, the memory consumption of this active shell will increase over time, as the Garbage Collector does not kick in.

This will fix the issue by forcing the GC to be called after each loop cycle.
2021-11-15 12:10:04 +01:00
Lord Hepipud
ba2c075982 Fixes memory leak on EventLog reader 2021-11-15 12:09:14 +01:00
Lord Hepipud
513b7db1c4
Merge pull request #400 from Icinga:fix/repo_hash_generator
Fix: Repo hash generator causes file hashes to never compare

Fixes repository file hash generator, which now only includes .zip and .msi files, which otherwise turned into invalid hashes because of the repository index file always changing based on the assigned hash, resulting in a different repository hash
2021-11-11 15:56:49 +01:00
Lord Hepipud
83d1bbae8a Fixes repo hash generator to only include zip/msi 2021-11-11 15:56:20 +01:00
Lord Hepipud
6a51086f6c
Merge pull request #401 from Icinga:fix/repository_manager_not_using_icinga_webrequests
Fix: Repository Manager is not using Icinga Web-Requests

Fixes the repository manager by now using Icinga WebRequests instead of Windows WebRequests, allowing the usage of the internal proxy feature.
2021-11-11 10:23:51 +01:00
Lord Hepipud
737a8fe80c Fix web requests for repos not using icinga Cmdlet 2021-11-11 10:21:53 +01:00
Lord Hepipud
6d51f01570
Merge pull request #398 from Icinga:fix/remove_stringbuilder_output_from_new_component
Fix: Removes String.Builder output while creating new components

Fixes String.Builder object output, while creating new components by using `New-IcingaForWindowsComponent`
2021-11-10 10:30:43 +01:00
Lord Hepipud
96476dbf41 Fixes object output of string builder 2021-11-10 10:29:22 +01:00
Lord Hepipud
e4c879f538 Sets next version to v1.8.0 2021-11-09 09:39:35 +01:00
Lord Hepipud
6fb630cf8c
Merge pull request #397 from Icinga:doc/fix_thresholdinterval_object_type
Fix: ThresholdInterval data type in plugin docs

Fixes `-ThresholdInterval` data type inside auto generated docs for plugins, which was of type `Object`, but should be of type `String`
2021-11-08 16:50:36 +01:00
Lord Hepipud
22a6a72568 Fixes thresholdinterval data type in docs 2021-11-08 16:49:33 +01:00
Lord Hepipud
b92d6d52da
Merge pull request #396 from Icinga:feature/add_plugin_documentation_creation
Feature: Adds function to create plugin documentation

Adds new function `Publish-IcingaPluginDocumentation` which was previously only available within the plugins package.
2021-11-08 16:37:08 +01:00