H
H
HighMan2021-01-15 20:50:57
Zabbix
HighMan, 2021-01-15 20:50:57

Zabbix 5.2 why do not agents connect to the server?

Hello comrades!
Some kind of terrible misunderstanding with the connection, or rather the non-connection, of Zabbix agents to the server.
There are 3 agents: on the Zabbix server itself (connects), on the Linux server (does not connect), on W2k8r2 (does not connect)
Server config (IP:192.168.17.80)

cat /etc/zabbix/zabbix_server.conf | grep -v '^\s*#\|^\s*$'
LogFile=/var/log/zabbix/zabbix_server.log
LogFileSize=0
PidFile=/var/run/zabbix/zabbix_server.pid
SocketDir=/var/run/zabbix
DBName=zabbix
DBUser=zabbix
DBPassword=*****
SNMPTrapperFile=/var/log/snmptrap/snmptrap.log
Timeout=4
LogSlowQueries=3000
StatsAllowedIP=127.0.0.1

W2k8r2 agent config(ip:192.168.17.150)
LogFile=C:\Program Files\Zabbix Agent\zabbix_agentd.log
Server=192.168.17.80
ServerActive=192.168.17.80
Hostname=oldwin
Include=C:\Program Files\Zabbix Agent\zabbix_agentd.conf.d\

Linux agent (IP:192.168.17.1)
# cat zabbix_agentd.conf
PidFile=/var/run/zabbix/zabbix_agentd.pid
LogFile=/var/log/zabbix/zabbix_agentd.log
LogFileSize=0
Server=192.168.17.80
ServerActive=192.168.17.80
Hostname=pobedit
SourceIP=192.168.17.1
#Include=/etc/zabbix/zabbix_agentd.d/*.conf

Agents are running. There aren't any pins. In the logs - absurdity!
Linux agent log
18202:20210115:201216.235 Starting Zabbix Agent [pobedit]. Zabbix 5.2.3 (revision ae46273eae).
 18202:20210115:201216.235 **** Enabled features ****
 18202:20210115:201216.235 IPv6 support:          YES
 18202:20210115:201216.235 TLS support:           YES
 18202:20210115:201216.235 **************************
 18202:20210115:201216.235 using configuration file: /etc/zabbix/zabbix_agentd.conf
 18202:20210115:201216.236 agent #0 started [main process]
 18203:20210115:201216.236 agent #1 started [collector]
 18204:20210115:201216.237 agent #2 started [listener #1]
 18206:20210115:201216.237 agent #4 started [listener #3]
 18207:20210115:201216.237 agent #5 started [active checks #1]
 18205:20210115:201216.238 agent #3 started [listener #2]

In the server logs, only your internal communication (with the left hand)
From the Zabbix server (192.168.17.80):
# zabbix_get -s 192.168.17.1 -k agent.version
5.2.3
# zabbix_get -s 192.168.17.158 -k agent.version
5.2.3

Everything is seen. Telnets pass, firewalls pass. AND NO FUCK!!!! Autodiscovery, set on the network 192.168.17.0/24, does not find anything. "Hosts" on the server: both non-local servers with gray ZBXs. Hostname is the same on the server and agents.
I've been banging my head against this wall for 2 days now. Deaf!

PS Deliberately allowed an ashypka in the agent's config. Changed (on the agent only) Hostname=pobedit1
On the server, for him Hostname=pobedit.
I restart the agent and run into the agent logs:
no active checks on server [192.168.17.80:10051]: host [pobedit1] not found

Server log:
6695:20210115:211218.233 cannot send list of active checks to "192.168.17.1": host [pobedit1] not found

Aha! They see each other perfectly and threw a tantrum about different hostnames.
Along the way, something is missing on the server for the agent.
For the Linux agent, I only have the group: "Linux servers"
Eureka!
You also need to add a template and make something with the "Group of data elements". I haven't figured out what's wrong yet.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question