Hello guys!
I used zabbix for a long time and everything was cool. I used passive check on ~100 VM (Linux and WIndow) and it works now.
But few days ago one of my machines started to work bad (with zabbix agent already) (it running out of memory and killed postrgresql process). I understood that i can get this logs to zabbix server, so the trigger will send me some messages about it.
I made smth like in tutorials:

. Also, my host was configured already with proper hostname (which is also correlates with hostname of my bad-working machine) also i changed zabbix-agent config and reloaded it.
``` ############ GENERAL PARAMETERS #################
### Option: PidFile
# Name of PID file.
#
# Mandatory: no
# Default:
# PidFile=/tmp/zabbix_agentd.pid
PidFile=/run/zabbix/zabbix_agentd.pid
EnableRemoteCommands=1
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
LogFileSize=2
DebugLevel=5
Server=serverlinux
#DisablePassive=0
#DisableActive=0
ListenPort=10050
ServerActive=serverlinux
Timeout=30
#listenIP=serverlinux
```
```
37482:20231228:115242.411 Starting Zabbix Agent [staffcop-pc]. Zabbix 4.0.17 (revision a528a0a4bc).
37482:20231228:115242.411 **** Enabled features ****
37482:20231228:115242.411 IPv6 support: YES
37482:20231228:115242.411 TLS support: YES
37482:20231228:115242.411 **************************
37482:20231228:115242.411 using configuration file: /etc/zabbix/zabbix_agentd.conf
37482:20231228:115242.411 In zbx_load_modules()
37482:20231228:115242.411 End of zbx_load_modules():SUCCEED
37482:20231228:115242.412 In init_collector_data()
37482:20231228:115242.412 In zbx_dshm_create() size:0
37482:20231228:115242.412 End of zbx_dshm_create():SUCCEED shmid:-1
37482:20231228:115242.412 End of init_collector_data()
37482:20231228:115242.412 agent #0 started [main process]
37493:20231228:115242.413 agent #1 started [collector]
37493:20231228:115242.413 In init_cpu_collector()
37493:20231228:115242.413 End of init_cpu_collector():SUCCEED
37493:20231228:115242.413 __zbx_zbx_setproctitle() title:'collector [processing data]'
37493:20231228:115242.413 In update_cpustats()
37494:20231228:115242.414 agent #2 started[listener #1]
37494:20231228:115242.414 In zbx_tls_init_child()
37493:20231228:115242.414 End of update_cpustats()
37493:20231228:115242.414 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
37494:20231228:115242.414 GnuTLS library (version 3.6.13) initialized
37494:20231228:115242.414 End of zbx_tls_init_child()
37494:20231228:115242.414 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
37497:20231228:115242.414 agent #5 started [active checks #1]
37497:20231228:115242.414 In zbx_tls_init_child()
37497:20231228:115242.414 GnuTLS library (version 3.6.13) initialized
37497:20231228:115242.414 End of zbx_tls_init_child()
37497:20231228:115242.414 In init_active_metrics()
37497:20231228:115242.415 buffer: first allocation for 100 elements
37497:20231228:115242.415 End of init_active_metrics()
37497:20231228:115242.415 In send_buffer() host:'serverlinux' port:10051 entries:0/100
37497:20231228:115242.415 End of send_buffer():SUCCEED
37497:20231228:115242.415 __zbx_zbx_setproctitle() title:'active checks #1 [getting list of active checks]'
37497:20231228:115242.415 In refresh_active_checks() host:'serverlinux' port:10051
37496:20231228:115242.415 agent #4 started[listener #3]
37496:20231228:115242.415 In zbx_tls_init_child()
37496:20231228:115242.416 GnuTLS library (version 3.6.13) initialized
37496:20231228:115242.416 End of zbx_tls_init_child()
37496:20231228:115242.416 __zbx_zbx_setproctitle() title:'listener #3 [waiting for connection]'
37495:20231228:115242.417 agent #3 started[listener #2]
37495:20231228:115242.417 In zbx_tls_init_child()
37495:20231228:115242.417 GnuTLS library (version 3.6.13) initialized
37495:20231228:115242.417 End of zbx_tls_init_child()
37495:20231228:115242.417 __zbx_zbx_setproctitle() title:'listener #2 [waiting for connection]'
37497:20231228:115242.424 active check configuration update from [serverlinux:10051] started to fail (cannot connect to [[serverlinux]:10051]: [111] Connection refused)
37497:20231228:115242.424 End of refresh_active_checks():FAIL
37497:20231228:115242.424 __zbx_zbx_setproctitle() title:'active checks #1 [processing active checks]'
37497:20231228:115242.424 In process_active_checks() server:'serverlinux' port:10051
37497:20231228:115242.424 End of process_active_checks()
37497:20231228:115242.424 In get_min_nextcheck()
37497:20231228:115242.424 End of get_min_nextcheck():-1
37497:20231228:115242.424 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
37493:20231228:115243.414 __zbx_zbx_setproctitle() title:'collector [processing data]'
37493:20231228:115243.414 In update_cpustats()
37493:20231228:115243.414 End of update_cpustats()
37493:20231228:115243.414 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
37497:20231228:115243.424 In send_buffer() host:'serverlinux' port:10051 entries:0/100
37497:20231228:115243.424 End of send_buffer():SUCCEED
37497:20231228:115243.424 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
37496:20231228:115244.062 __zbx_zbx_setproctitle() title:'listener #3 [processing request]'
37496:20231228:115244.064 Requested [system.cpu.num]
```
So what i also want to say: my zabbix runs in NAT, so only firewall of vm can block smth, but i unblocked 10050 and 10051.
also, my zabbix server runs in kubernetis.(i just remade some docker settings to kubernetis it.)
Passive info of all zabbix agents works fine (include this machine)
Also i tried to change config file like Activeserver=myserver:10050
and in logs there were another problem it said that zabbix cant parse active checks.
Can u plz help me?
BTW sry for bad eng/
I used zabbix for a long time and everything was cool. I used passive check on ~100 VM (Linux and WIndow) and it works now.
But few days ago one of my machines started to work bad (with zabbix agent already) (it running out of memory and killed postrgresql process). I understood that i can get this logs to zabbix server, so the trigger will send me some messages about it.
I made smth like in tutorials:
``` ############ GENERAL PARAMETERS #################
### Option: PidFile
# Name of PID file.
#
# Mandatory: no
# Default:
# PidFile=/tmp/zabbix_agentd.pid
PidFile=/run/zabbix/zabbix_agentd.pid
EnableRemoteCommands=1
LogFile=/var/log/zabbix-agent/zabbix_agentd.log
LogFileSize=2
DebugLevel=5
Server=serverlinux
#DisablePassive=0
#DisableActive=0
ListenPort=10050
ServerActive=serverlinux
Timeout=30
#listenIP=serverlinux
```
```
37482:20231228:115242.411 Starting Zabbix Agent [staffcop-pc]. Zabbix 4.0.17 (revision a528a0a4bc).
37482:20231228:115242.411 **** Enabled features ****
37482:20231228:115242.411 IPv6 support: YES
37482:20231228:115242.411 TLS support: YES
37482:20231228:115242.411 **************************
37482:20231228:115242.411 using configuration file: /etc/zabbix/zabbix_agentd.conf
37482:20231228:115242.411 In zbx_load_modules()
37482:20231228:115242.411 End of zbx_load_modules():SUCCEED
37482:20231228:115242.412 In init_collector_data()
37482:20231228:115242.412 In zbx_dshm_create() size:0
37482:20231228:115242.412 End of zbx_dshm_create():SUCCEED shmid:-1
37482:20231228:115242.412 End of init_collector_data()
37482:20231228:115242.412 agent #0 started [main process]
37493:20231228:115242.413 agent #1 started [collector]
37493:20231228:115242.413 In init_cpu_collector()
37493:20231228:115242.413 End of init_cpu_collector():SUCCEED
37493:20231228:115242.413 __zbx_zbx_setproctitle() title:'collector [processing data]'
37493:20231228:115242.413 In update_cpustats()
37494:20231228:115242.414 agent #2 started[listener #1]
37494:20231228:115242.414 In zbx_tls_init_child()
37493:20231228:115242.414 End of update_cpustats()
37493:20231228:115242.414 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
37494:20231228:115242.414 GnuTLS library (version 3.6.13) initialized
37494:20231228:115242.414 End of zbx_tls_init_child()
37494:20231228:115242.414 __zbx_zbx_setproctitle() title:'listener #1 [waiting for connection]'
37497:20231228:115242.414 agent #5 started [active checks #1]
37497:20231228:115242.414 In zbx_tls_init_child()
37497:20231228:115242.414 GnuTLS library (version 3.6.13) initialized
37497:20231228:115242.414 End of zbx_tls_init_child()
37497:20231228:115242.414 In init_active_metrics()
37497:20231228:115242.415 buffer: first allocation for 100 elements
37497:20231228:115242.415 End of init_active_metrics()
37497:20231228:115242.415 In send_buffer() host:'serverlinux' port:10051 entries:0/100
37497:20231228:115242.415 End of send_buffer():SUCCEED
37497:20231228:115242.415 __zbx_zbx_setproctitle() title:'active checks #1 [getting list of active checks]'
37497:20231228:115242.415 In refresh_active_checks() host:'serverlinux' port:10051
37496:20231228:115242.415 agent #4 started[listener #3]
37496:20231228:115242.415 In zbx_tls_init_child()
37496:20231228:115242.416 GnuTLS library (version 3.6.13) initialized
37496:20231228:115242.416 End of zbx_tls_init_child()
37496:20231228:115242.416 __zbx_zbx_setproctitle() title:'listener #3 [waiting for connection]'
37495:20231228:115242.417 agent #3 started[listener #2]
37495:20231228:115242.417 In zbx_tls_init_child()
37495:20231228:115242.417 GnuTLS library (version 3.6.13) initialized
37495:20231228:115242.417 End of zbx_tls_init_child()
37495:20231228:115242.417 __zbx_zbx_setproctitle() title:'listener #2 [waiting for connection]'
37497:20231228:115242.424 active check configuration update from [serverlinux:10051] started to fail (cannot connect to [[serverlinux]:10051]: [111] Connection refused)
37497:20231228:115242.424 End of refresh_active_checks():FAIL
37497:20231228:115242.424 __zbx_zbx_setproctitle() title:'active checks #1 [processing active checks]'
37497:20231228:115242.424 In process_active_checks() server:'serverlinux' port:10051
37497:20231228:115242.424 End of process_active_checks()
37497:20231228:115242.424 In get_min_nextcheck()
37497:20231228:115242.424 End of get_min_nextcheck():-1
37497:20231228:115242.424 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
37493:20231228:115243.414 __zbx_zbx_setproctitle() title:'collector [processing data]'
37493:20231228:115243.414 In update_cpustats()
37493:20231228:115243.414 End of update_cpustats()
37493:20231228:115243.414 __zbx_zbx_setproctitle() title:'collector [idle 1 sec]'
37497:20231228:115243.424 In send_buffer() host:'serverlinux' port:10051 entries:0/100
37497:20231228:115243.424 End of send_buffer():SUCCEED
37497:20231228:115243.424 __zbx_zbx_setproctitle() title:'active checks #1 [idle 1 sec]'
37496:20231228:115244.062 __zbx_zbx_setproctitle() title:'listener #3 [processing request]'
37496:20231228:115244.064 Requested [system.cpu.num]
```
So what i also want to say: my zabbix runs in NAT, so only firewall of vm can block smth, but i unblocked 10050 and 10051.
also, my zabbix server runs in kubernetis.(i just remade some docker settings to kubernetis it.)
Passive info of all zabbix agents works fine (include this machine)
Also i tried to change config file like Activeserver=myserver:10050
and in logs there were another problem it said that zabbix cant parse active checks.
Can u plz help me?
BTW sry for bad eng/
Comment