I have installed zabbix-agent on a Linux server. Changed IP address and hostname. Then restart zabbix-agent. Seems to run
zabbix-agent.service - Zabbix Agent
Loaded: loaded (/usr/lib/systemd/system/zabbix-agent.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-09-21 16:43:09 CEST; 16min ago
Process: 511720 ExecStart=/usr/sbin/zabbix_agentd -c $CONFFILE (code=exited, status=0/SUCCESS)
Main PID: 511722 (zabbix_agentd)
Tasks: 6 (limit: 97584)
Memory: 3.8M
CPU: 339ms
CGroup: /system.slice/zabbix-agent.service
├─511722 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
├─511723 "/usr/sbin/zabbix_agentd: collector [idle 1 sec]"
├─511724 "/usr/sbin/zabbix_agentd: listener #1 [waiting for connection]"
├─511725 "/usr/sbin/zabbix_agentd: listener #2 [waiting for connection]"
├─511726 "/usr/sbin/zabbix_agentd: listener #3 [waiting for connection]"
└─511727 "/usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]"
Sep 21 16:43:09 localhost.localdomain systemd[1]: Starting Zabbix Agent...
Sep 21 16:43:09 localhost.localdomain systemd[1]: Started Zabbix Agent.
but the agent does not connect to the server. I get this
could someone help ??? thanks strong text
The
Host nameis Zabbix server (case sensitive), in otherwords, there is a Zabbix Agent running in you Zabbix Server to monitoring it. You can see it in your image or inData collection-Hosts.This
Host NameMUST the same that inHostnameline inzabbix_agentd.conf(orZBX_HOSTNAMEif you use a Zabbix Agent docker container). These need to match. So, in this file do:Serverline to:Hostnameline to:and restart the Zabbix Agent service.
If this doesn't work, in Zabbix Web Interface:
Data collection-HostsDns nameto your host name (the hostname that Zabbix Agent knows) and selectDNS