Hello everyone.
I am new to Ubuntu, Zabbix and programming and want to prepare the ui for existing servers and a docker in one of the servers.
I need help to connect my Docker to the Zabbix ui.
I have done the following steps.
In UbuntuServer1 (Us1), I installed Zabbix Server.
In UbuntuServer2 (Us2), I installed Zabbix agent.
I added a Host to Zabbix ui and I can monitor my Us2 server. It works fine.
In Us2 I installed Docker, I added 2 containers, with nginx image, named nginx1 and nginx2.
I went to Hosts, added a new host with the server ip of the Us2, Template: Docker by Zabbix agent 2.
It didn't work. In the latest data of this host in the info tab i get this message: Unsupported item key.
After searching I saw that I have to install Zabbix Agent 2 to my Us2. I did it and both agents are running, but I had to change the port for Zabbix Agent 2 to 10051 because the default port 10050 was used by Zabbix Agent 1.
I added the Host again but with 10051 port and in the latest data, in the info tab i get this message:
"Cannot fetch data: Get "http://1.28/info": dial unix /var/run/docker.sock: connect: permission denied."
I run both servers with the "root" user.
I am new to Ubuntu, Zabbix and programming and want to prepare the ui for existing servers and a docker in one of the servers.
I need help to connect my Docker to the Zabbix ui.
I have done the following steps.
In UbuntuServer1 (Us1), I installed Zabbix Server.
In UbuntuServer2 (Us2), I installed Zabbix agent.
I added a Host to Zabbix ui and I can monitor my Us2 server. It works fine.
In Us2 I installed Docker, I added 2 containers, with nginx image, named nginx1 and nginx2.
I went to Hosts, added a new host with the server ip of the Us2, Template: Docker by Zabbix agent 2.
It didn't work. In the latest data of this host in the info tab i get this message: Unsupported item key.
After searching I saw that I have to install Zabbix Agent 2 to my Us2. I did it and both agents are running, but I had to change the port for Zabbix Agent 2 to 10051 because the default port 10050 was used by Zabbix Agent 1.
I added the Host again but with 10051 port and in the latest data, in the info tab i get this message:
"Cannot fetch data: Get "http://1.28/info": dial unix /var/run/docker.sock: connect: permission denied."
I run both servers with the "root" user.

Comment