mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 22:18:18 +02:00
Improved check-health.ps1
This commit is contained in:
parent
f8b4a31a5e
commit
cfbad6f2d7
@ -10,24 +10,24 @@ $Hostname = $(hostname)
|
|||||||
$Healthy = 1
|
$Healthy = 1
|
||||||
"Checking health of $Hostname ..."
|
"Checking health of $Hostname ..."
|
||||||
|
|
||||||
& check-swap-space.ps1
|
& ./check-swap-space.ps1
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
|
|
||||||
if ($IsLinux) {
|
if ($IsLinux) {
|
||||||
& check-drive-space.ps1 /
|
& ./check-drive-space.ps1 /
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
} else {
|
} else {
|
||||||
& check-drive-space.ps1 C
|
& ./check-drive-space.ps1 C
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
& check-cpu-temp.ps1
|
& ./check-cpu-temp.ps1
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
|
|
||||||
& check-dns-resolution.ps1
|
& ./check-dns-resolution.ps1
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
|
|
||||||
& check-ping.ps1
|
& ./check-ping.ps1
|
||||||
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
if ($lastExitCode -ne "0") { $Healthy = 0 }
|
||||||
|
|
||||||
if ($Healthy) {
|
if ($Healthy) {
|
||||||
|
Loading…
Reference in New Issue
Block a user