Zabbix server log error: cannot send list of active checks to “121.40.250.47”: host [121.40.250.47] not found

Zabbix server log error: cannot send list of active checks to “121.40.250.47”: host [121.40.250.47] not found

1. Problem background

Docker installs zabbix monitoring and finds that the client cannot connect, check the server log and report an error

cannot send list of active checks to “121.40.250.47”: host [121.40.250.47] not found

image-20230318162218375

image-20230318161913379

Checked the client and found that the client is also reporting an error

image-20230318164231315

2. Solutions

After inspection, it was found that in the zabbix-agentd.conf file

Server=server ip address

ServerActive=server ip address

Hostname=hostname in the web page --> as shown below

image-20230318164548181

The docker server defaults to this name when it is installed, but the Hostname of zabbix_agentd.conf in my client is the ip address

The modification is as follows

Server=172.20.240.3
ServerActive=172.20.240.3
Hostname=Zabbix server

There is still a pit here: there is no permission to directly modify it in the container. It is best to use docker cp to copy this file to the local modification, then delete the original client, and use the -v parameter to mount this file into the container

At this point, check the logs of the server and the client and there is no error, but it is found that the client is still not monitored in the web page

Because the installed zabbix is ​​used, the server and the client are two containers, which are equivalent to two separate machines, so you need to modify the default monitoring ip address in the page and change it to the address in the client container.

image-20230318165303145

After modification, it was found that the monitoring was successful

Guess you like

Origin blog.csdn.net/m0_49562857/article/details/129639698