From f24ee75a31d497cdeab20946dae1dbe52ca7f518 Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Thu, 4 Dec 2025 11:00:59 +0100 Subject: [PATCH] Add more debug logging --- library/Perfdatagraphs/Common/PerfdataChart.php | 3 +++ 1 file changed, 3 insertions(+) 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)) {