zabbix-module-latest-data
zabbix-module-latest-data copied to clipboard
Display correct hosts latest data - Zabbix 6.0/6.2
Hi, Since upgrading Zabbix from 5.4 to 6.0 and even 6.2 the module is not working correctly. We have also created a new blank install of Zabbix 6.2 and 6.0 same issue. Under Monitoring in Hosts when you click on Latest Data or left click on the host its not display that hosts latest data. Could you please help?
Hi, make sure you use correct tag when you download code from this repository. v1.0.2 is for Zabbix 5.4 v2.0.0 is for Zabbix 6.0/6.2
Hi, Thanks for your response see below image. We are using v2.0.0 for both installs
I cannot reproduce. Can you take a look at your php/apache(or nginx) logs and tell me what error you see there?
This is a repeated error found in the error.log of apache relating to the module. Centos 8 Stream install and running PHP 7.4.30.
[Wed Aug 31 17:01:53.900008 2022] [proxy_fcgi:error] [pid 13447:tid 139859595339520] [client] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught Error: Class 'Modules\BGmotLD\Actions\CControllerResponseFatal' not found in /usr/share/zabbix/modules/zabbix-module-latest-data-main/actions/CControllerBGLatestViewRefresh.php:68\nStack trace:\n#0 /usr/share/zabbix/include/classes/mvc/CController.php(462): Modules\BGmotLD\Actions\CControllerBGLatestViewRefresh->checkInput()\n#1 /usr/share/zabbix/include/classes/core/ZBase.php(599): CController->run()\n#2 /usr/share/zabbix/include/classes/core/ZBase.php(216): ZBase->processRequest()\n#3 /usr/share/zabbix/include/config.inc.php(25): ZBase->run()\n#4 /usr/share/zabbix/zabbix.php(22): require_once('/usr/share/zabb...')\n#5 {main}\n thrown in /usr/share/zabbix/modules/zabbix-module-latest-data-main/actions/CControllerBGLatestViewRefresh.php on line 68'
Can you copy paste URL from your browser after you go to Monitoring->Latest data please?
Please remove and install this module again off main branch https://github.com/BGmot/zabbix-module-latest-data/archive/refs/heads/main.zip. I've found and fixed the PHP error you are seeing in logs. Now you should be able to see in your browser what is not liked by Zabbix. Please tell me what you see.
Thanks error has been cleared; however still performing the same behaviour. Under Monitoring > Latest data the URL of the host latest data is
Zabbix 6.2 http://IP_ADDRESS/zabbix.php?action=latest.view&hostids%5B0%5D=10530&filter_name=
Which is the correct ID. however its still display Latest data from the last host not the actual one
However we have another instance of Zabbix 5.4. If I perform the below it works in 5.4. If I copy the above URL amend in Zabbix 6.2 it works
Zabbix 5.4 http://IP_ADDRESS/zabbix.php?action=latest.view&filter_set=1&filter_hostids%5B0%5D=10530
It appears the URL has changed between Zabbix 5.4 and 6.2 which is causing issue with the module within the latest data url
Try to start with http://IP_ADDRESS/zabbix.php?action=latest.view
It displays the last host to obtain the latest data. URL is the same as above
Can you please post bunch of screenshots... with URL and what's shown below. I cannot reproduce the problem.
See attached
You are showing Hosts menu item not Latest data.
Thanks but I don't see anything wrong here, all metrics properly grouped and this is what the plugin does.
When I click on the hosts, then host and latest data for that host. Its display the correct record of that host. Its displays another host data
I am afraid I don't understand.
Do you have an email so I can sent you a video
ey at bgmot.com
Thanks Email sent
Thanks for reporting this bug! Please test new version of this plugin https://github.com/BGmot/zabbix-module-latest-data/tree/v2.0.1
Hi
Since upgrading to 6.2 to 6.4 Zabbix. The issues experiencing the same issues which we experienced with 6.2
We we search within the host > press latest data. It not showing information for that host
I cannot reproduce.
- Open Latest data
- in Filter select one host and click 'Apply' I see Latest data only for this host.
Please give steps to reproduce.
Basically I search a host. Select Latest data under monitoring. It only displays previous host latest data or zabbix server. Also Under Monitoring > Hosts > Select Latest data. Same again
URL is http://localhost/zabbix/zabbix.php?action=latest.view&hostids[]=14374&filter_set=1
However on our Zabbix 6.2 instance using the same module the URL. Where the module works. The URL is during the same test
http://localhost/zabbix/zabbix.php?action=latest.view&hostids[]=14374&filter_name=
If I copy the URL from the zabbix 6.2 to the 6.4 instance as both systems are the same. it works
Could we please change the code from &filter_set=1 to &filter_name=
Yes I have tested this '&filter_set=1 to &filter_name=1' link change and it works in terms of the specific host being selected in Zabbix 6.0.17 (module 2.0.1).
However it wont let you filter on item names, tags or anything else as it gets cleared etc
I can't change to filter_name=
as it is coming from page not controlled by this module, moreover you can remove filter_name=
from URL and it will still work.
Nevertheless I tried to fix this issue in https://github.com/BGmot/zabbix-module-latest-data/tree/v3.0.1 please test.
Hi,
I tried using branch v3.0.1 for Zabbix 6.0.X and it reports 'Unable to load module'.
However I have manually put your code changes in yesterdays commits in place and can confirm they work and the latest data will now open with only the specific hosts latest data rather than all, so thanks.
I guess the code for 6.0.X needs to have its own branch based off tag v2.0.1 with yesterdays changes as there is some form of incompatibility.
Regards James
v2.0.2 works for issue (https://github.com/BGmot/zabbix-module-latest-data/issues/3) and now just the file 'actions/CControllerBGLatestView.php' need to be updated with:
Line 222: // CBGProfile::updateArray('web.latest.filter.hostids', $this->getInput('filter_hostids', []), PROFILE_TYPE_ID); if (!$this->hasInput('hostids')) { CBGProfile::updateArray('web.latest.filter.hostids', $this->getInput('filter_hostids', []), PROFILE_TYPE_ID); }