Skip to content

Commit

Permalink
Merge branch 'release/1.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
OSSemenikhin committed Mar 11, 2024
2 parents 72b2f4f + a00a52f commit c170bb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion check_scripts/check_veeam_space.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ if ($line -ne $null) {
if ($line -match "Quota \(mb\):(\d+), FreeSpace \(mb\):(\d+)") {
$quota = $matches[1] / 1000
$freeSpace = $matches[2] / 1000
$used = [math]::Round(($quota - $freeSpace), 2)
$usedResult = [math]::Round(($used / $quota) * 100, 2)
$result = [math]::Round(($freeSpace / $quota) * 100, 2)

$regex = "\[(\d{2}\.\d{2}\.\d{4} \d{2}:\d{2}:\d{2})\]"
Expand All @@ -37,7 +39,8 @@ if ($line -ne $null) {
}
}

$output = "check_veeam_space.$($states_text[$state])::freeSpace==$($freeSpace)__quota==$($quota)__date==$($date)__result==$($result) | QUOTA=$($quota);;;; FREESPACE=$($freeSpace);;;;"
$output = "check_veeam_space.$($states_text[$state])::freeSpace==$($freeSpace)__quota==$($quota)__date==$($date)__result==$($result)__usedResult==$($usedResult)__used==$($used) | QUOTA=$($quota);;;; USED=$($used);;;;"
#$output = "check_veeam_space.$($states_text[$state])::result==$($result)__date=$($date) | RESULT=$($result);;;;"
Write-Output $output
exit $state

0 comments on commit c170bb7

Please sign in to comment.