[ZBX-20207] Auto changing interface from IP to DNS Created: 2021 Nov 11 Updated: 2024 Jul 16 |
|
Status: | Need info |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Agent (G), Proxy (P), Server (S) |
Affects Version/s: | 5.4.7, 6.0.0alpha6 |
Fix Version/s: | None |
Type: | Problem report | Priority: | Trivial |
Reporter: | Артём Викториевич Антоненко | Assignee: | Aigars Kadikis |
Resolution: | Unresolved | Votes: | 7 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
windows agent, centos 8 proxy, centos 8 server |
Attachments: | 1.png 11-1.png 11.png 1111.png 2.png 22.png 3.png image-2021-12-21-15-35-08-036.png image-2022-01-03-10-23-31-439.png zabbix_agentd_without_hostinterface.rar Скриншот 2021-12-21 15.30.27.png Скриншот 2022-02-01 13.23.59.png | ||||
Issue Links: |
|
Description |
Configured auto-registration action (pic attached)
|
Comments |
Comment by Aigars Kadikis [ 2021 Nov 15 ] | ||||||||||||||||||||||||||||||||
Thank you for using latest version. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Nov 15 ] | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Nov 15 ] | ||||||||||||||||||||||||||||||||
I have created a Zabbix Server 5.4.7, Zabbix Proxy 5.4.7, configured an auto registration rule and linked one agent to proxy. Waiting for the problem to appear. At zabbix_agentd.conf, do you have only one record configured for 'ServerActive='? Proxy is active or passive? | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Nov 15 ] | ||||||||||||||||||||||||||||||||
To lower down components involved in issue, please disable exiting rule and create one auto registration rule with one condition:
Let me know if issue repeats. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Nov 16 ] | ||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Nov 17 ] | ||||||||||||||||||||||||||||||||
Do you need any additional information? | ||||||||||||||||||||||||||||||||
Comment by Armen [ 2021 Nov 19 ] | ||||||||||||||||||||||||||||||||
Hello! I have same issue when i using autoregistration actions. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Dec 12 ] | ||||||||||||||||||||||||||||||||
anybody? the problem still persists... | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Dec 20 ] | ||||||||||||||||||||||||||||||||
Please have a look at how the proxy is sending the auto registration data to the central server. Run this in the proxy database: SELECT FROM_UNIXTIME(clock),host,listen_ip,listen_port,listen_dns,host_metadata,flags,tls_accepted FROM proxy_autoreg_host ORDER BY clock ASC; The meaning of columns:
I suspect the last column 'flags' in your situation will start sending number '2': 2, ZBX_CONN_DNS - connect using DNS name, update default host interface Please confirm. If this is the case, we will move to the agent side troubleshooting. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Dec 20 ] | ||||||||||||||||||||||||||||||||
as i see "flags" is not last, it is 2 from last so it is "0" | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Dec 20 ] | ||||||||||||||||||||||||||||||||
Thank you for info. On the server SERVER_1C 1859A779 if you manually put: HostInterface=192.168.0.222 Then restart agent. In GUI, in the very next second, does the GUI automatically switch the bullet to correct place? Show me more precise agent version: zabbix_agentd -V Is it zabbix_agentd Win64 (service) (Zabbix) 5.4.7, Revision 84dc2ec5dc 28 October 2021, compilation time: Oct 28 2021 13:18:12? | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Dec 21 ] | ||||||||||||||||||||||||||||||||
if i use HostInterface=192.168.0.222
if i don`t use - pic 11-1 .png
zabbix_agentd -V zabbix_agentd.exe -V | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Dec 27 ] | ||||||||||||||||||||||||||||||||
Thank you very much for the test. This is valuable. Let's find out which bit triggers the default interface to change. 1) Force 'HostInterface=192.168.0.222' for a moment. Make sure the GUI has the default interface to IP (correct). 2) Stop agent and install 'DebugLevel=5' and 'LogFileSize=0' in zabbix_agentd.conf. Remove 'HostInterface=192.168.0.222' line. Remove old zabbix_agentd.log. 3) Start agent. Wait till the default interface goes to DNS (wrong). It's possible it will go in the very next minute. 4) Upload compressed zabbix_agentd.log. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2021 Dec 29 ] | ||||||||||||||||||||||||||||||||
i don`t understand 1 but delete host then make 2,3 and 4 wait till the default interface goes to DNS (wrong) can`t tell you at what time it happened, but it happened zabbix_agentd_without_hostinterface.rar | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2021 Dec 30 ] | ||||||||||||||||||||||||||||||||
The log file did not capture a different auto-registration data. It's sending all the time. 117444:20211229:222248.938 sending [{"request":"active checks","host":"SERVER_1C 1859A779"}] 117444:20211229:222448.950 sending [{"request":"active checks","host":"SERVER_1C 1859A779"}] 117444:20211229:222648.967 sending [{"request":"active checks","host":"SERVER_1C 1859A779"}] In a native way, this line can trigger changes to the host configuration. I think it's something related to the host's name which is having a white space in the middle. Possibly a bug. The forum post also has a: Hostname=SRV_M 7A4A594A I have rarely seen using a space for the host's identification (Host visible name is OK). Now I did setup lab to use your value 'SERVER_1C 1859A779' for my host name. Will see how it works in the long run. armen_a_a , can you please comment on your situation? - are you using white space for the host title? | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2022 Jan 03 ] | ||||||||||||||||||||||||||||||||
For troubleshooting purpose please install these settings: Set the bullet manually back for the host 'SERVER_1C 1859A779' and remove the secondary interface. Once the unwelcome behaviour occurred, we can analyze in retrospect in central database how the auto-registration data changed: SELECT events.eventid, events.objectid, events.clock, autoreg_host.proxy_hostid, autoreg_host.listen_ip, autoreg_host.listen_port, autoreg_host.listen_dns, autoreg_host.host_metadata, autoreg_host.tls_accepted, autoreg_host.flags FROM events JOIN autoreg_host ON (autoreg_host.autoreg_hostid=events.objectid) WHERE events.source=2 AND events.object=3 AND autoreg_host.host='SERVER_1C 1859A779'; I suspect there must be something going on with fields 'autoreg_host.listen_ip', 'autoreg_host.listen_dns', 'autoreg_host'. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2022 Jan 04 ] | ||||||||||||||||||||||||||||||||
same problem with
| ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2022 Jan 13 ] | ||||||||||||||||||||||||||||||||
Do you need any additional information? | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2022 Jan 21 ] | ||||||||||||||||||||||||||||||||
Do you have hosts attached directly to the central server? Are they working perfectly? No secondary interface applies? Check carefully. There are only 14 lines in SQL output. The setting "Auto registration data storage period" = 30d has not been really respected yet. We need to save more lines to troubleshoot in retrospect. You said it's around 2 days for the interface to switch passive checks to DNS. | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2022 Feb 01 ] | ||||||||||||||||||||||||||||||||
i have some hosts attached directly to the central server. They are working perfectly. Same time i have some hosts attached via another proxy to the central server. And they are working perfectly. same lines till end | ||||||||||||||||||||||||||||||||
Comment by Артём Викториевич Антоненко [ 2022 Feb 09 ] | ||||||||||||||||||||||||||||||||
Do you need any additional information? | ||||||||||||||||||||||||||||||||
Comment by Aigars Kadikis [ 2022 Mar 24 ] | ||||||||||||||||||||||||||||||||
If the auto registration setting still installed as '30d' and you have seen the behaviour in the last days. Please put all auto-registration data in TSV file. We can use the following approach: echo "SELECT events.eventid, events.objectid, events.clock, autoreg_host.proxy_hostid, autoreg_host.host, autoreg_host.listen_ip, autoreg_host.listen_port, autoreg_host.listen_dns, autoreg_host.host_metadata, autoreg_host.tls_accepted, autoreg_host.flags FROM events JOIN autoreg_host ON (autoreg_host.autoreg_hostid=events.objectid) WHERE events.source=2 AND events.object=3" | mysql -sN --batch nameOfZabbixDB > /tmp/autoreg.events.tsv Please mention the hostname again which is having a problem and approximate date when it was OK and not OK. |