Reputation: 477
I am trying to create scheduled reports but my zabbix web service is not working. I always get this message:
Cannot connect to web service: timeout was reached
I am using Zabbix Composed installation on Ubuntu server with the docker. Here are images which I am using right now:
zabbix\zabbix-web-service:ubuntu-latest
zabbix\zabbix-web-nginx-mysql:ubuntu-latest
zabbix\zabbix-server-mysql:ubuntu-latest
zabbix\zabbix-agent:ubuntu-latest
mysql:8.0
busybox:latest
I were so desperate that I upgraded my whole solution to the :latest images from the version 5.4 and hoped it will solve my problem - not helped.
I used the wireshark to check TCP traffic and not helped - my zabbix web service will not respond to my zabbix server (1 minute timeout).
I tried to generate a report from an empty dashboard because of data size - not helped.
I tried to set debug logs to level 5 and read logs through the docker - not helped.
I found out that scheduled reports will be generated only when I restart my zabbix web service docker container and immediately after the container startup, I will generate a report. This is the only way when I was able to generate a report. Little bit after the container will be started, I will receive the error again
Upvotes: 0
Views: 1845
Reputation: 36
I am also deploying zabbix in docker, and I can use scheduled reports normally.
I deployed the following container in docker:
docker run --name zabbix-server -d --restart always \
--link mysql:zabbix-mysql \
// ...
-e ZBX_STARTREPORTWRITERS="2" \
-e ZBX_WEBSERVICEURL="http://docker:10053/report" \
-p 10051:10051 \
-d zabbix/zabbix-server-mysql:alpine-latest
docker run --name zabbix-web -d --restart always \
--link mysql:zabbix-mysql \
--link zabbix-server:zabbix-server \
// ...
-p 80:8080 \
zabbix/zabbix-web-nginx-mysql:alpine-latest
docker run --name zabbix-web-service -d --restart always \
-e ZBX_ALLOWEDIP="127.0.0.1,192.168.1.0/24,172.17.0.0/16" \
-e ZBX_TLSACCEPT=unencrypted \
-e ZBX_DEBUGLEVEL=5 \
-v zabbix_agent2_enc:/var/lib/zabbix/enc \
--cap-add=SYS_ADMIN \
-p 10053:10053 \
zabbix/zabbix-web-service:alpine-latest
Here you need to pay attention to setting ZBX_ALLOWEDIP:
172.17.0.4/16
192.168.1.2/24
- Proceed to the Administration → General → Other parameters frontend menu section
- Specify the full URL of the Zabbix web interface in the Frontend URL parameter. https://www.zabbix.com/documentation/current/manual/appendix/install/web_service#zabbix_frontend
My zabbix web interface url is http://docker/zabbix.php
, I set Frontend URL to http://docker
.
Don't follow the picture in the document, set Frontend URL to http://docker/zabbix
.
You can try to access http://docker/zabbix.php?action=dashboard.print&dashboardid=1
, it should display the dashboard correctly.
If you set Frontend URL to http://docker/zabbix
according to the document, you will access http://docker/zabbix/zabbix.php?action=dashboard.print&dashboardid=1
and get File not found.
Upvotes: 1