mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-22 07:39:52 -05:00
Check Commands will now return their Exit Code instead of exiting
This commit is contained in:
parent
928602a2e6
commit
b95281a1d8
9 changed files with 9 additions and 9 deletions
|
|
@ -4,5 +4,5 @@ function Invoke-IcingaCheckBiosSerial()
|
||||||
{
|
{
|
||||||
$Bios = Get-IcingaBiosSerialNumber;
|
$Bios = Get-IcingaBiosSerialNumber;
|
||||||
$BiosCheck = New-IcingaCheck -Name $Bios.Name -Value $Bios.Value -NoPerfData;
|
$BiosCheck = New-IcingaCheck -Name $Bios.Name -Value $Bios.Value -NoPerfData;
|
||||||
exit (New-IcingaCheckresult -Check $BiosCheck -NoPerfData $TRUE -Compile);
|
return (New-IcingaCheckresult -Check $BiosCheck -NoPerfData $TRUE -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,5 +28,5 @@ function Invoke-IcingaCheckCPU()
|
||||||
$CpuPackage.AddCheck($IcingaCheck);
|
$CpuPackage.AddCheck($IcingaCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Name 'CPU Load' -Check $CpuPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Name 'CPU Load' -Check $CpuPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,5 +50,5 @@ function Invoke-IcingaCheckEventlog()
|
||||||
$EventLogPackage.AddCheck($IcingaCheck);
|
$EventLogPackage.AddCheck($IcingaCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Name 'EventLog' -Check $EventLogPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Name 'EventLog' -Check $EventLogPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,5 +30,5 @@ function Invoke-IcingaCheckProcessCount()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Check $ProcessPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Check $ProcessPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -75,5 +75,5 @@ function Invoke-IcingaCheckService()
|
||||||
$ServicesPackage.AddCheck($IcingaCheck);
|
$ServicesPackage.AddCheck($IcingaCheck);
|
||||||
|
|
||||||
}
|
}
|
||||||
exit (New-IcingaCheckResult -Name 'Services' -Check $ServicesPackage -NoPerfData $TRUE -Compile);
|
return (New-IcingaCheckResult -Name 'Services' -Check $ServicesPackage -NoPerfData $TRUE -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -54,5 +54,5 @@ function Invoke-IcingaCheckUpdates()
|
||||||
$UpdatePackage.AddCheck($UpdateList);
|
$UpdatePackage.AddCheck($UpdateList);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Name 'Pending Updates' -Check $UpdatePackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Name 'Pending Updates' -Check $UpdatePackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,5 +23,5 @@ function Invoke-IcingaCheckUptime()
|
||||||
|
|
||||||
$CheckPackage = New-IcingaCheckPackage -Name $Name -OperatorAnd -Checks $IcingaCheck -Verbose $Verbose;
|
$CheckPackage = New-IcingaCheckPackage -Name $Name -OperatorAnd -Checks $IcingaCheck -Verbose $Verbose;
|
||||||
|
|
||||||
exit (New-IcingaCheckresult -Check $CheckPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckresult -Check $CheckPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,5 @@ function Invoke-IcingaCheckUsedPartitionSpace()
|
||||||
$DiskPackage.AddCheck($IcingaCheck);
|
$DiskPackage.AddCheck($IcingaCheck);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Check $DiskPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Check $DiskPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -38,5 +38,5 @@ function Invoke-IcingaCheckUsers()
|
||||||
$UsersPackage.AddCheck($IcingaCheck)
|
$UsersPackage.AddCheck($IcingaCheck)
|
||||||
}
|
}
|
||||||
|
|
||||||
exit (New-IcingaCheckResult -Name 'Users' -Check $UsersPackage -NoPerfData $NoPerfData -Compile);
|
return (New-IcingaCheckResult -Name 'Users' -Check $UsersPackage -NoPerfData $NoPerfData -Compile);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue