Delete Scripts/Network-Utilisation-Monitoring.ps1
This commit is contained in:
parent
94bc297ea1
commit
1b8bf74668
1 changed files with 0 additions and 15 deletions
|
|
@ -1,15 +0,0 @@
|
|||
$WARNING = 25
|
||||
$CRITICAL = 50
|
||||
$TransferRate = ((Get-Counter "\\huawei-mb-x-pro\сетевой интерфейс(intel[r] wi-fi 6e ax211 160mhz)\всего байт/с"
|
||||
).countersamples | select -ExpandProperty CookedValue)*8
|
||||
$NetworkUtilisation = [math]::round($TransferRate/1000000000*100,2)
|
||||
if ($NetworkUtilisation -gt $CRITICAL){
|
||||
Write-Output "CRITICAL: $($NetworkUtilisation) % Network utilisation, $($TransferRate.ToString('N0')) b/s"
|
||||
# exit 2
|
||||
}
|
||||
if ($NetworkUtilisation -gt $WARNING){
|
||||
Write-Output "WARNING: $($NetworkUtilisation) % Network utilisation, $($TransferRate.ToString('N0')) b/s"
|
||||
# exit 1
|
||||
}
|
||||
Write-Output "OK: $($NetworkUtilisation) % Network utilisation, $($TransferRate.ToString('N0')) b/s"
|
||||
# exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue