Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions library/Perfdatagraphs/Common/PerfdataChart.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Icinga\Module\Perfdatagraphs\Widget\QuickActions;

use Icinga\Application\Benchmark;
use Icinga\Application\Logger;
use Icinga\Util\Json;

use ipl\Html\Html;
Expand Down Expand Up @@ -127,6 +128,7 @@ public function createChart(string $hostName, string $serviceName, string $check
// Error handling, if this gets too long, we could move this to a method.
if ($perfdata->hasErrors()) {
$msg = sprintf($this->translate('Error while fetching data: %s'), join(' ', $perfdata->getErrors()));
Logger::debug('Error while fetching data: %s', Json::sanitize($perfdata));
}

if ($perfdata->isEmpty()) {
Expand All @@ -135,6 +137,7 @@ public function createChart(string $hostName, string $serviceName, string $check

if (!$perfdata->isValid()) {
$msg = $msg . ' ' . sprintf($this->translate('Invalid data received: %s'), join(' ', $perfdata->getErrors()));
Logger::debug('Invalid data received: %s', Json::sanitize($perfdata));
}

if (isset($msg)) {
Expand Down