Hi comunnity. On my fresh icinga installation, Grafana module throving following errors:
Deprecated
: Creation of dynamic property Icinga\Module\Grafana\ProvidedHook\Icingadb\ServiceDetailExtension::$permission is deprecated in
/usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php
on line
75
Deprecated
: Creation of dynamic property Icinga\Module\Grafana\ProvidedHook\Icingadb\ServiceDetailExtension::$dashboard is deprecated in
/usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php
on line
222
Deprecated
: Creation of dynamic property Icinga\Module\Grafana\ProvidedHook\Icingadb\ServiceDetailExtension::$dashboarduid is deprecated in
/usr/share/icingaweb2/modules/grafana/library/Grafana/ProvidedHook/Icingadb/IcingaDbGrapher.php
on line
223
After couple of secconds graph for service is loaded, but service page still looks like the following:
Icinga DB Web version : 1.1.0
Icinga Web 2 version : 2.11.4
Icinga 2 version : r2.14.0-1
Icinga DB version : v1.1.1
PHP version used : PHP 8.2.11
Server operating system: Debian 12
Hi there,
can someone explain what i have to do to for this workaround? I’ve got the same error.
the Workaround looks like:
diff --git a/library/Grafana/ProvidedHook/Icingadb/HostDetailExtension.php b/library/Grafana/ProvidedHook/Icingadb/HostDetailExtension.php
index 85a0126..dc0ec75 100644
--- a/library/Grafana/ProvidedHook/Icingadb/HostDetailExtension.php
+++ b/library/Grafana/ProvidedHook/Icingadb/HostDetailExtension.php
@@ -8,6 +8,7 @@ use ipl\Html\Html;
use ipl\Html\HtmlString;
use ipl\Html\ValidHtml;
+#[\AllowDynamicProperties]
class HostDetailExtension extends HostDetailExtensionHook
{
use IcingaDbGrapher;
diff --git a/library/Grafana/ProvidedHook/Icingadb/ServiceDetailExtension.php b/library/Grafana/ProvidedHook/Icingadb/ServiceDetailExtension.php
index 00fa6ed..0d4fa9c 100644
--- a/library/Grafana/ProvidedHook/Icingadb/ServiceDetailExtension.php
+++ b/library/Grafana/ProvidedHook/Icingadb/ServiceDetailExtension.php
@@ -8,6 +8,7 @@ use ipl\Html\Html;
use ipl\Html\HtmlString;
use ipl\Html\ValidHtml;
+#[\AllowDynamicProperties]
class ServiceDetailExtension extends ServiceDetailExtensionHook
{
use IcingaDbGrapher;
I can read the words but i don’t understand what the trying to tell me.
Can anyone explain this to me?
Thank you for your patience
Chris
Hi, anyone here who tested this fix and has positive experiences? I added the line “#[\AllowDynamicProperties]” into HostDetailExtension.php and ServiceDetailExtension.php and the results are: “deprecated”-message disappear but no graph is rendered inside icingaweb2 (stays empty). If you change directly to grafana by clicking on the graph data will be displayed.