moudsen / mailGraph

Zabbix Media module and scripts for sending templated e-mail alerts enriched with multiple configurable graphs and associated event information
MIT License
33 stars 5 forks source link

Error using Trigger Tag "mailGraph.graph" #46

Open BernhardLinz opened 6 days ago

BernhardLinz commented 6 days ago

I try to use the Tag mailGraph.graph, i got an error in the log:

2024-11-20 12:58:19 : !! (8) "Undefined index: graphid" at line #1394 of "/var/www/html/mailGraph/mailGraph.php"
2024-11-20 12:58:19 : !! (8) "Undefined index: name" at line #1395 of "/var/www/html/mailGraph/mailGraph.php"
2024-11-20 12:58:19 : # Adding FORCED graph #
2024-11-20 12:58:19 : !! (8) "Undefined index: graphtype" at line #1404 of "/var/www/html/mailGraph/mailGraph.php"

In the email i got the message: Zabbix has received an incorrect request. Field "graphid" is not integer.

I found the reason, there is an error in the mailGraph.php at Line 1373:

            $theGraph = $forceGraphInfo;

must be changed to

            $theGraph = $forceGraphInfo['result'][0];

then everything works fine.

Regards, Bernhard

moudsen commented 5 days ago

I'm impressed and will take this enhancement forward in my next release (on short notice). Appreciated! Kind regards, Mark