veeam_grafana icon indicating copy to clipboard operation
veeam_grafana copied to clipboard

erreur lors de l'exécution du script

Open Gwen44-github opened this issue 1 year ago • 2 comments

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

  • ... $repoObj = New-Object -TypeName PSObject -Property @{
  •                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], RuntimeException
    • FullyQualifiedErrorId : RuntimeException

Avez-vous une idée.

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

Merci

Gwen44-github avatar Mar 06 '23 11:03 Gwen44-github

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) }

stratanic avatar Mar 22 '23 18:03 stratanic

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

Gwen44-github avatar Mar 23 '23 10:03 Gwen44-github