Reputation: 1
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
Upvotes: 0
Views: 4911
Reputation: 1
The Host name
is 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 in Data collection
- Hosts
.
This Host Name
MUST the same that in Hostname
line in zabbix_agentd.conf
(or ZBX_HOSTNAME
if you use a Zabbix Agent docker container). These need to match. So, in this file do:
Server
line to:Server=127.0.0.1 # or Zabbix Server IP/hostname
Hostname
line to:Hostname=Zabbix server # literal
and restart the Zabbix Agent service.
If this doesn't work, in Zabbix Web Interface:
Data collection
- Hosts
Dns name
to your host name (the hostname that Zabbix Agent knows) and select DNS
Upvotes: 0