jorgedlcruz / veeam_grafana

Scripts and other herbs for Veeam and Grafana
GNU General Public License v3.0
57 stars 16 forks source link

erreur lors de l'exécution du script #13

Open Gwen44-github opened 1 year ago

Gwen44-github commented 1 year ago

Bonjour, Merci pour le travail :) Je rencontres des erreurs quand je lance le script powershell : Tentative de division par zéro. Au caractère D:\Scripts\veeam01.ps1:59 : 25

Avez-vous une idée.

J'ai quelques metriques qui remontent mais pas tous car j'ai cette erreur.

Merci

stratanic commented 1 year ago

You can can make this line 59 (correction ligne 59) if ($free -gt 0) { $repoObj = New-Object -TypeName PSObject -Property @{ Target = $name RepoHost = $repohost Storepath = $path StorageFree = [Math]::Round([Decimal]$free/1GB,2) StorageTotal = [Math]::Round([Decimal]$total/1GB,2) FreePercentage = [Math]::Round(($free/$total)*100) }

Gwen44-github commented 1 year ago

I confirm I modified ligne 59 and now I have no error when I launch the script.

But when I import dashboard I have no metric event if i change serveur name into influx request. Into the dashboard you use Successful-Backups is not present into database I have only this name : time failedbackupcopys failedbackups failedreplications failesbackupcopys failesbackups failesreplications host idlebackupcopys protectedendpoints runningbackupcopys runningbackups runningreplications successfulbackupcopys successfulbackups successfulreplications totalbackupread warningbackupcopys warningbackups warningreplications

And idea? Thanks