diff --git a/library/Perfdatagraphs/Common/PerfdataChart.php b/library/Perfdatagraphs/Common/PerfdataChart.php index 3e4948b..9b95914 100644 --- a/library/Perfdatagraphs/Common/PerfdataChart.php +++ b/library/Perfdatagraphs/Common/PerfdataChart.php @@ -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; @@ -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()) { @@ -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)) {