We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5f0db23 commit 6c43694Copy full SHA for 6c43694
src/Log/Prometheus.php
@@ -122,9 +122,12 @@ public function onPhpbuEnd(End $event)
122
$this->write('# HELP phpbu_backup_size The size of the last successful backup' . PHP_EOL);
123
$this->write('# TYPE phpbu_backup_size gauge' . PHP_EOL);
124
foreach ($this->backupStats as $backupName => $backupStats) {
125
+ if($this->backupStats[$backupName]['size'] = " ") {
126
+ $this->backupStats[$backupName]['size'] = 0;
127
+ }
128
$this->write(
129
'phpbu_backup_size{name="' . $backupName . '"} ' .
- 0 .
130
+ $this->backupStats[$backupName]['size'] .
131
PHP_EOL
132
);
133
}
0 commit comments