Commit graph

2062 commits

Author SHA1 Message Date
Alexander Aleksandrovič Klimov
d4ddf6734c Get-IcingaCheckCommandConfig: set vars.ifw_api_command in all commands
Useful in case someone renames the commands in Director.

Otherwise, in this case, all commands would be broken with ifw-api as vars.ifw_api_command defaults to $command.name$.
2023-07-25 15:15:25 +02:00
Lord Hepipud
351f7586db
Merge pull request #654 from Icinga:fix/sync_repo_not_saving_ssh_settings
Fix: Sync-IcingaRepository not saving SSH settings

Fixes `Sync-IcingaRepository` which did not save the SSH user and host inside the repository configuration, preventing `Update-IcingaRepository` to work properly and added missing scp progress
2023-07-25 00:36:51 +02:00
LordHepipud
0b2fa0d256 Fixes Sync-IcingaRepository not saving SSH settings 2023-07-25 00:35:20 +02:00
Lord Hepipud
eb87a5aff5
Merge pull request #653 from Icinga:doc/improves_api_forwarded_docs
Docs: Improves API forwarder documentation
2023-07-24 23:37:17 +02:00
LordHepipud
183f8dc0e8 Improves API forwarder docs 2023-07-24 23:36:37 +02:00
xGitJojo
be29d7dbd5
Feature: Adds option for formatted, colored console prints (#638)
* Adds feature for colored console prints
2023-07-24 23:28:22 +02:00
Lord Hepipud
538750633c
Merge pull request #652 from Icinga:fix/improve_custom_variable_too_long_error_message
Fix: Config generator custom variable too long error message

Fixes error message during config generation with `Get-IcingaCheckCommandConfig` to make it more clear, in case the custom variables generated are too long for the Icinga Director import
2023-07-24 23:21:40 +02:00
LordHepipud
4c7012b8da Fixes config generator custom variable too long message 2023-07-24 23:20:35 +02:00
Lord Hepipud
ff5618f957
Merge pull request #651 from Icinga:feature/write_repository_name_into_json_file
Feature: Adds support to write the name of the repo inside the json file

Adds support to write the name of the repository synced/created into the local `ifw.repo.json` file
2023-07-24 23:10:00 +02:00
LordHepipud
0541fccc85 Adds support to write the name of the repo inside the json file 2023-07-24 23:09:23 +02:00
Lord Hepipud
64c3b46b94
Merge pull request #650 from Icinga:feature/adds_support_to_run_icinga_while_creating_no_new_instance
Feature: Adds support to not load a new PowerShell instance for command icinga

Adds support to run command `icinga` with new argument `-NoNewInstance`, to use `-RebuildCache` as example to update the current PowerShell instance with all applied changes, instead of create a new shell instance.

Does not support the argument `-DeveloperMode` in the same call, as Icinga for Window is dependent on these files for the current session.
2023-07-24 22:25:57 +02:00
LordHepipud
7f07811a63 Adds feature to not load a new PowerShell instance for command icinga 2023-07-24 22:23:28 +02:00
Lord Hepipud
fbd286f369
Merge pull request #637 from Icinga:feature/new_plugin_provider_handling
Feature: Adds new plugin data provider handling and cpu data

Adds new base handling for future data providers with first metrics for `CPU` information
2023-07-24 18:48:49 +02:00
Lord Hepipud
6de511c9fb Adds new plugin data provider handling and cpu data 2023-07-24 18:44:36 +02:00
Lord Hepipud
e436bd9284
Merge pull request #648 from Icinga:fix/improves_rest_api_memory_management
Fix: Improves REST-Api memory management

Fixes some memory management while using the REST-Api to clear connection objects once they are no longer required
2023-07-24 17:53:39 +02:00
Lord Hepipud
e96711efba Improves REST-Api memory management 2023-07-24 17:53:59 +02:00
Lord Hepipud
7ed21189c0
Merge pull request #647 from Icinga:fix/improve_exception_and_error_handling
Feature: Improves error/exception handling
2023-07-24 17:37:38 +02:00
Lord Hepipud
438bd86985 Improves error/exception handling 2023-07-24 17:37:41 +02:00
Lord Hepipud
87a9d126d2 Sets copyright 2023 2023-07-24 12:29:51 +02:00
Lord Hepipud
b5e5995e0c
Merge pull request #646 from Icinga:fix/allow_rest_api_to_handle_args_with_and_without_leading_-
Fix: REST-Api to allow args with and without leading -

Fixes REST-Api to allow arguments for check execution with and without leading `-`
2023-07-24 12:04:25 +02:00
Lord Hepipud
014aae1985 Fixes REST-Api to allow args with and without leading - 2023-07-24 12:04:11 +02:00
Lord Hepipud
57b21ef0ce
Merge pull request #633 from Al2Klimov/ifw_api_arguments
Get-IcingaCheckCommandConfig: provide vars.ifw_api_arguments in each command

Adds support for Icinga 2.14.0 native Icinga for Windows API communication
2023-07-24 11:19:04 +02:00
Lord Hepipud
aa6d324108
Merge branch 'master' into ifw_api_arguments 2023-07-24 11:17:52 +02:00
Lord Hepipud
a11e6405d3 Adds docs and adds plain config writer for ifw-api support 2023-07-24 11:16:34 +02:00
Lord Hepipud
3bef2b4338
Merge pull request #645 from Icinga:fix/error_and_exception_handling_while_using_api
Fix: Error and exception handling over API checks

Fixes error and exception handling while using API-Checks, which now will in most cases always return a proper check-result object and also abort while running into plugin execution errors, in case a server is not reachable by the time sync plugin as example.
2023-07-19 17:49:34 +02:00
LordHepipud
fa79477790 Fixes error and exception handling over API checks 2023-07-19 17:48:21 +02:00
Lord Hepipud
68aba5f1d4
Merge pull request #644 from Icinga:feature/improve_repo_handling_by_using_progress_preference
Feature: Adds progress bar to repository interaction instead of text output

Instead of writing every file processed within the console output, we now use the progress bar handling to provide a better idea on how many files have been processed during a sync and update.

![image](https://github.com/Icinga/icinga-powershell-framework/assets/5050288/8feb8727-b515-4325-9a11-40be36e76c0b)

In addition, creating new repositories will now give an overview on how many files have been processed so far including the remaining files, instead of waiting for the shell to complete the task without any output.

![image](https://github.com/Icinga/icinga-powershell-framework/assets/5050288/00d309ea-fe33-4b30-a43b-5fb12fa66c9e)
2023-07-14 20:16:22 +02:00
LordHepipud
188f3caed5 Adds progress bar to repository interaction instead of text output 2023-07-14 20:15:14 +02:00
Lord Hepipud
3d228097ed
Merge pull request #643 from Icinga:feature/rebuild_cache_should_also_apply_to_installed_components
Feature: Adds support for -RebuildCache flag on icinga cmd to rebuild component cache

Adds support to simply use `-RebuildCache` for

```powershell
icinga -RebuildCache;
```

or

```powershell
icinga -Shell -RebuildCache;
```

to generate a new cache file not only for the Framework (like before), but also for all installed components of Icinga for Windows.

This makes it easier for regular use and error handling, as users will not have to remember a different Cmdlet or use the `-DeveloperMode` to force Icinga for Windows to rebuild everything.
2023-07-14 19:33:34 +02:00
LordHepipud
a1dff5b5ab Adds support for -RebuildCache flag on icinga cmd to rebuild component cache 2023-07-14 19:31:53 +02:00
Lord Hepipud
6220349bc4
Merge pull request #642 from Icinga:feature/allow_to_configure_director_self_service_register_string
Feature: Adds support to configure Director Self-Service config string

This new feature allows to configure the Icinga Director Self-Service call during registration, by modifing the JSON-String. This will only apply to the first time registration of a host and is not modified again, unless the host and director keys for this specific host object are removed.

This works directly inside the IMC installation wizard as well as for the exported installation command or file.

By doing so, you can manually define the IP-Address with `address` key in your JSON as well as the display name of an object with `display_name`. Example:

```json
{ "address": "127.0.0.1", "display_name": "Example Host" }
```

The following constants are available inside the configuration:

`$ifw.hostaddress$`: Will use the default IP-Address automatically fetched from the system
`$ifw.hostname$`: The current hostname of the host, without FQDN and not modiying upper/lowercase
`$ifw.hostfqdn$`: The current FQDN of the host, without case modification

For lower and upper case modification, you can use `.tolower` or `.toupper` for the hostname and FQDN, example:

```json
{ "address": "127.0.0.1", "display_name": "$ifw.hostname.tolower$" }
```
2023-07-14 13:46:27 +02:00
LordHepipud
100a666e09 Adds support to configure Director Self-Service config string 2023-07-14 13:37:38 +02:00
Lord Hepipud
08bb19673d
Merge pull request #641 from Icinga:feature/add_flag_to_ignore_ssl_errors_on_imc_and_installer
Feature: Adds support to ignore SSL errors on IMC, Shell and Installer

Adds support to set the flag `-NoSSLValidation` for Cmdlets `icinga` and `Install-Icinga`, to ignore errors on self-signed certificates within the environment.

Example:

```powershell
icinga -NoSSLValidation
```
Icinga Shell:

```powershell
icinga -Shell -NoSSLValidation
```
2023-07-12 15:32:53 +02:00
Lord Hepipud
05653fea5a Adds support to ignore SSL errors on IMC, Shell and Installer 2023-07-12 13:24:52 +02:00
Lord Hepipud
1db93896f8
Merge pull request #635 from Icinga:feature/add_configuration_arg_for_agent_cipher_list
Feature: Adds support to allow Agent cipher list configuration

Adds support for `Write-IcingaAgentApiConfig` function to configure the Icinga Agent TLS cipher list setting.
2023-07-11 12:10:51 +02:00
Lord Hepipud
009a885e43 Updates README.md with badges 2023-07-06 17:10:01 +02:00
LordHepipud
5a5f08c120 Adds argument to allow Agent cipher list configuration 2023-06-27 16:01:43 +02:00
Alexander A. Klimov
e17adcce54 Get-IcingaCheckCommandConfig: provide vars.ifw_api_arguments in each command
to properly support just importing the ifw-api command.
That command e.g. takes DSL/JSON arrays [], not PS ones @(). Similar with strings.
Therefore set vars.ifw_api_arguments as ifw-api expects.
2023-06-06 14:52:32 +02:00
Lord Hepipud
e8c55d37d4
Merge pull request #607 from Al2Klimov/de-de
Link to docs.microsoft.com/en-us, not docs.microsoft.com/de-de
2023-06-02 17:21:14 +02:00
Lord Hepipud
e06e781f39
Merge pull request #628 from Al2Klimov/patch-2
Get-IcingaCheckCommandConfig: fix copy&paste error
2023-06-02 17:12:27 +02:00
Alexander Aleksandrovič Klimov
3aab2dd83a
Get-IcingaCheckCommandConfig: fix copy&paste error
Pass -NoLogo and -NoProfile once, not -NoLogo twice.
2023-06-01 12:11:30 +02:00
Lord Hepipud
7b3d06440c
Merge pull request #626 from Icinga:feature/new_auth_error_exception_message
Feature: Adds new exception message for Windows auth
2023-05-26 17:46:29 +02:00
Lord Hepipud
50d9110d3c Adds new exception message for Windows auth 2023-05-26 17:45:39 +02:00
Lord Hepipud
df034a7e3e
Merge pull request #625 from Icinga:feature/add_support_for_user_with_at_sign
Feature: Adds support to provide user and domain with @ separated

Adds support to provide the Icinga service user written as user@domain
2023-05-26 14:21:46 +02:00
Lord Hepipud
00c3d67967 Adds support to provide user and domain with @ separated 2023-05-26 14:17:26 +02:00
Lord Hepipud
389db1bb6c
Merge pull request #624 from Icinga:fix/migration_fails_on_multiple_framework_installations
Fix: Framework migration error on multi framework installation

Fixes the framework migration tasks which fails in case multiple versions of the framework are installed, printing warnings in case there is
2023-05-26 14:10:03 +02:00
Lord Hepipud
cb6aee0975 Fixes the framework migration error on multi framework installation 2023-05-26 14:09:31 +02:00
Lord Hepipud
d91500fa4b
Merge pull request #620 from Icinga:fix/prevent_recursive_looping_on_first_framework_initialisation
Fix: Recursive loop on first loading of Framework

Prevents the Icinga for Windows framework to recursively import itself on first startup or after reseting the cache file.
2023-05-23 16:12:41 +02:00
Lord Hepipud
65488a1696
Merge pull request #622 from Icinga:doc/fix_metric_over_time_docs
Doc: Updates metric over time docs for intervals

Icinga for Windows changed the behavior on how metrics over time `-TimeIndexes` argument works, as you now have to add the unit for the time to build the average for.
2023-05-12 11:33:29 +02:00
Lord Hepipud
33062facf4 Updates metric over time docs for intervals 2023-05-12 11:32:29 +02:00