Hi,
(systems details are pasted in at the end of the post - however both zabbix and the agent are running version 3.4.10-1.el7 with MySQL backend)
I've added some Web Monitors and their triggers to a Template called "Web Checks" using the API, and added this template to my main zabbix server "zabbix". However when trying to view this in "Monitoring -> Web" I am seeing PHP errors in the output.... The error seems to be related to when the httpdetails.php screen attempts to call getMinClock() in CHistoryManager.php
I am seeing this error on the Monitoring-Web screen...

Initially the page seems to return ok, but after a few minutes, the error appears and stays there.
The template for the web monitoring looks like this
Background
Running zabbix packages from the draios repos;
Packages are updated...
System is CentOS 7.5
Update: this issue arises when creating and adding Web Scenarios to Templates, and applying them to hosts using the API. Currently it appears that adding a Web Scenario to a Template, doesn't automatically propagate that to the linked hosts.
I've added some Web Monitors and their triggers to a Template called "Web Checks" using the API, and added this template to my main zabbix server "zabbix". However when trying to view this in "Monitoring -> Web" I am seeing PHP errors in the output.... The error seems to be related to when the httpdetails.php screen attempts to call getMinClock() in CHistoryManager.php
I am seeing this error on the Monitoring-Web screen...
Initially the page seems to return ok, but after a few minutes, the error appears and stays there.
Code:
Undefined offset: 35 [httpdetails.php:82 → CScreenHttpTestDetails->get() in
include/classes/screens/CScreenHttpTestDetails.php:99]
Invalid argument supplied for foreach() [httpdetails.php:82 →
CScreenHttpTestDetails->get() in include/classes/screens/CScreenHttpTestDetails.php:122]
min(): Array must contain at least one element [httpdetails.php:121 →
CHistoryManager->getMinClock() → min() in include/classes/api/managers/CHistoryManager.php:728
The template for the web monitoring looks like this
HTML Code:
<?xml version="1.0" encoding="UTF-8"?> <zabbix_export> <version>3.4</version> <date>2018-06-30T21:33:42Z</date> <groups> <group> <name>Templates</name> </group> <group> <name>Web Checks</name> </group> </groups> <templates> <template> <template>Web Checks</template> <name>Web Checks</name> <description/> <groups> <group> <name>Templates</name> </group> <group> <name>Web Checks</name> </group> </groups> <applications/> <items/> <discovery_rules/> <httptests> <httptest> <name>somesite.com</name> <application/> <delay>1m</delay> <attempts>1</attempts> <agent>Zabbix</agent> <http_proxy/> <variables/> <headers/> <status>0</status> <authentication>0</authentication> <http_user/> <http_password/> <verify_peer>0</verify_peer> <verify_host>0</verify_host> <ssl_cert_file/> <ssl_key_file/> <ssl_key_password/> <steps> <step> <name>somesite.com-1</name> <url>http://somesite.com</url> <query_fields/> <posts/> <variables/> <headers/> <follow_redirects>1</follow_redirects> <retrieve_mode>0</retrieve_mode> <timeout>15s</timeout> <required/> <status_codes/> </step> </steps> </httptest> </httptests> <macros/> <templates/> <screens/> </template> </templates> <triggers> <trigger> <expression>{Web Checks:web.test.error[somesite.com].strlen()}>0</expression> <recovery_mode>0</recovery_mode> <recovery_expression/> <name>Web scenario "Scenario" failed: {ITEM.VALUE} (alt)</name> <correlation_mode>0</correlation_mode> <correlation_tag/> <url/> <status>0</status> <priority>3</priority> <description/> <type>0</type> <manual_close>0</manual_close> <dependencies/> <tags/> </trigger> </triggers> </zabbix_export>
Background
Running zabbix packages from the draios repos;
Code:
# cat /etc/yum.repos.d/draios.repo.repo [draios] baseurl = http://download.draios.com/stable/rpm/$basearch enabled = 1 gpgcheck = 1 name = Draios
Code:
[root@zabbix ~]# rpm -qa | grep zabbix zabbix-web-mysql-3.4.10-1.el7.noarch zabbix-get-3.4.10-1.el7.x86_64 zabbix-agent-3.4.10-1.el7.x86_64 zabbix-web-3.4.10-1.el7.noarch zabbix-server-mysql-3.4.10-1.el7.x86_64 zabbix-sender-3.4.10-1.el7.x86_64
Code:
[root@zabbix ~]# cat /etc/redhat-release CentOS Linux release 7.5.1804 (Core)
Comment