2021-02-23 03:15:24 -05:00
|
|
|
<#
|
|
|
|
|
.SYNOPSIS
|
|
|
|
|
Clears the entire check scheduler cache environment and frees memory as
|
|
|
|
|
well as cleaning the stack
|
|
|
|
|
.DESCRIPTION
|
|
|
|
|
Clears the entire check scheduler cache environment and frees memory as
|
|
|
|
|
well as cleaning the stack
|
|
|
|
|
.FUNCTIONALITY
|
|
|
|
|
Clears the entire check scheduler cache environment and frees memory as
|
|
|
|
|
well as cleaning the stack
|
|
|
|
|
.OUTPUTS
|
|
|
|
|
System.Object
|
|
|
|
|
.LINK
|
|
|
|
|
https://github.com/Icinga/icinga-powershell-framework
|
|
|
|
|
#>
|
|
|
|
|
|
|
|
|
|
function Clear-IcingaCheckSchedulerEnvironment()
|
|
|
|
|
{
|
2021-12-09 11:42:06 -05:00
|
|
|
param (
|
|
|
|
|
[switch]$ClearCheckData = $FALSE
|
|
|
|
|
);
|
2021-02-23 03:15:24 -05:00
|
|
|
|
|
|
|
|
Get-IcingaCheckSchedulerPluginOutput | Out-Null;
|
|
|
|
|
Get-IcingaCheckSchedulerPerfData | Out-Null;
|
2021-12-09 11:42:06 -05:00
|
|
|
|
|
|
|
|
if ($ClearCheckData) {
|
|
|
|
|
Clear-IcingaCheckSchedulerCheckData;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$Global:Icinga.Private.Scheduler.PluginException = $null;
|
|
|
|
|
$Global:Icinga.Private.Scheduler.CheckResults = $null;
|
|
|
|
|
$Global:Icinga.Private.Scheduler.ExitCode = $null;
|
2021-02-23 03:15:24 -05:00
|
|
|
}
|