[ZBX-20045] zabbix_agent2 net.dns does not honor dns server setting Created: 2021 Oct 04  Updated: 2021 Oct 05

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 5.4.5
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Patrice Gautier Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: Docker
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Running zabbix_agent2 5.4.5 on Ubuntu under Docker.

It doesn't matter what DNS server I put in the key, it always succeeds:

docker exec zabbixAgent2 zabbix_agent2 -t "net.dns.record[0.0.0.0,google.com,A]"
net.dns.record[0.0.0.0,google.com,A]          [s|google.com           A        172.217.5.110]

 

 

docker exec zabbixAgent2 zabbix_agent2 -t "net.dns.record[10.10.10.10,google.com,A]"
net.dns.record[10.10.10.10,google.com,A]      [s|google.com           A        142.250.72.206]

 

 

docker exec zabbixAgent2 zabbix_agent2 -t "net.dns.record[12,google.com,A]"
net.dns.record[12,google.com,A]               [s|google.com           A        216.58.222.14]

 



 Comments   
Comment by Patrice Gautier [ 2021 Oct 04 ]

BTW, this works fine with zabbix_agent (not 2)

Comment by Aleksey Volodin [ 2021 Oct 05 ]

Confirmed.

This affect only agent2 in Docker container.

From CentOS8:

zabbix_agent2 -t "net.dns.record[0.0.0.0,google.com,A]"
net.dns.record[0.0.0.0,google.com,A] [m|ZBX_NOTSUPPORTED] [Cannot perform DNS query.]

From Ubuntu 20:

zabbix_agent2 -t "net.dns.record[0.0.0.0,google.com,A]"
net.dns.record[0.0.0.0,google.com,A] [m|ZBX_NOTSUPPORTED] [Cannot perform DNS query.]

From Decker container:

docker exec some-zabbix-agent zabbix_agent2 -t "net.dns.record[0.0.0.0,google.com,A]"
net.dns.record[0.0.0.0,google.com,A] [s|google.com A 142.250.150.100
google.com A 142.250.150.101
google.com A 142.250.150.102
google.com A 142.250.150.113
google.com A 142.250.150.138
google.com A 142.250.150.139]
Generated at Thu May 08 07:50:29 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.