jiuka / checkmk_veeam_o365

Checkmk Agent Plugin and Checks for Veeam for Office 365
https://exchange.checkmk.com/p/veeam-o365
GNU General Public License v2.0
5 stars 1 forks source link

Problems with transfered data #8

Closed spex3141 closed 2 years ago

spex3141 commented 2 years ago

2 Problems: If transfered value does not match pattern in if clause it uses the value from the job before If transfered value is above 2GByte int value is to large for int

I use: if ($o365JobLastSession.Statistics.TransferredData -match '\d+(.\d+)? [A-Z]B') { $transferred = [math]::Round($(Invoke-Expression -Command ($o365JobLastSession.Statistics.TransferredData -replace ' '))) } else { $transferred=0 }