mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-21 07:10:15 -05:00
Supress other messages then plugin output
This commit is contained in:
parent
527b3951ba
commit
01b39ea514
3 changed files with 14 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
|
|
||||||
### Enhancements
|
### Enhancements
|
||||||
|
|
||||||
|
* [#228](https://github.com/Icinga/icinga-powershell-framework/issues/228) Adds feature to suppress any kind of console output except for plugin output and performance data
|
||||||
* [#229](https://github.com/Icinga/icinga-powershell-framework/pull/229) CustomFields defined as `SecureString` are now set to `hidden` within the Icinga Director configuration basket - please read the [upgrading docs](30-upgrading-framework.md) carefully
|
* [#229](https://github.com/Icinga/icinga-powershell-framework/pull/229) CustomFields defined as `SecureString` are now set to `hidden` within the Icinga Director configuration basket - please read the [upgrading docs](30-upgrading-framework.md) carefully
|
||||||
* [#234](https://github.com/Icinga/icinga-powershell-framework/pull/234) Adds support to allow custom exception lists for Icinga Exceptions, making it easier for different modules to ship their own exception messages
|
* [#234](https://github.com/Icinga/icinga-powershell-framework/pull/234) Adds support to allow custom exception lists for Icinga Exceptions, making it easier for different modules to ship their own exception messages
|
||||||
* [#235](https://github.com/Icinga/icinga-powershell-framework/pull/235) 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`
|
* [#235](https://github.com/Icinga/icinga-powershell-framework/pull/235) 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`
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
function Use-Icinga()
|
function Use-Icinga()
|
||||||
{
|
{
|
||||||
param(
|
param (
|
||||||
[switch]$LibOnly = $FALSE,
|
[switch]$LibOnly = $FALSE,
|
||||||
[switch]$Daemon = $FALSE,
|
[switch]$Daemon = $FALSE,
|
||||||
[switch]$DebugMode = $FALSE,
|
[switch]$DebugMode = $FALSE,
|
||||||
|
|
@ -20,6 +20,14 @@ function Use-Icinga()
|
||||||
Disable-IcingaProgressPreference;
|
Disable-IcingaProgressPreference;
|
||||||
|
|
||||||
if ($Minimal) {
|
if ($Minimal) {
|
||||||
|
if ($null -eq $global:Icinga) {
|
||||||
|
$global:Icinga = @{ };
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($global:Icinga.ContainsKey('Minimal') -eq $FALSE) {
|
||||||
|
$global:Icinga.Add('Minimal', $TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
# If we load the minimal Framework files, we have to ensure our enums are loaded
|
# If we load the minimal Framework files, we have to ensure our enums are loaded
|
||||||
Import-Module ([string]::Format('{0}\lib\icinga\exception\Icinga_IcingaExceptionEnums.psm1', $PSScriptRoot)) -Global;
|
Import-Module ([string]::Format('{0}\lib\icinga\exception\Icinga_IcingaExceptionEnums.psm1', $PSScriptRoot)) -Global;
|
||||||
Import-Module ([string]::Format('{0}\lib\icinga\enums\Icinga_IcingaEnums.psm1', $PSScriptRoot)) -Global;
|
Import-Module ([string]::Format('{0}\lib\icinga\enums\Icinga_IcingaEnums.psm1', $PSScriptRoot)) -Global;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,13 @@
|
||||||
function Write-IcingaPluginOutput()
|
function Write-IcingaPluginOutput()
|
||||||
{
|
{
|
||||||
param(
|
param (
|
||||||
$Output
|
$Output
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE) {
|
if ($global:IcingaDaemonData.FrameworkRunningAsDaemon -eq $FALSE) {
|
||||||
|
if ($null -ne $global:Icinga -And $global:Icinga.Minimal) {
|
||||||
|
Clear-Host;
|
||||||
|
}
|
||||||
Write-IcingaConsolePlain $Output;
|
Write-IcingaConsolePlain $Output;
|
||||||
} else {
|
} else {
|
||||||
# New behavior with local thread separated results
|
# New behavior with local thread separated results
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue