[ZBX-8909] net.dns.record fails with mysterious message "Cannot perform DNS query" Created: 2014 Oct 16  Updated: 2025 Apr 11  Resolved: 2025 Apr 11

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

Type: Incident report Priority: Trivial
Reporter: richlv Assignee: Zabbix Support Team
Resolution: Unsupported version Votes: 5
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

trunk r49825

$ zabbix_get -s 127.0.0.1 -k net.dns.record[,www.zabbix.com]
ZBX_NOTSUPPORTED: Cannot perform DNS query.

note that the issue is with the error message - requesting zone like 'zabbix.com' works properly



 Comments   
Comment by richlv [ 2014 Oct 16 ]

(1) debuglevels 4 & 5 do not seem to print anything about what's returned - this might be a more global issue, though
notice how this key gets "Sending back" entry :

 20647:20141016:014349.161 Requested [net.tcp.service[http]]
 20647:20141016:014349.161 Sending back [1]
 20647:20141016:014349.161 listener #3 [waiting for connection]

but this does not :

 20647:20141016:014350.709 Requested [net.dns.record[,www.zabbix.com]]
 20647:20141016:014350.710 listener #3 [waiting for connection]
Comment by Janne Korkkula [ 2014 Oct 22 ]

net.dns.record shouldn't return ZBX_NOTSUPPORTED for failed queries. It does.

Comment by richlv [ 2014 Oct 22 ]

how do those queries fail ?

Comment by Janne Korkkula [ 2014 Oct 22 ]

In this case, any DNS error will do - host not found, no record of requested type, etc. This on a 2.2.6 server and 2.2.6 agent, tested with data types character and text, both fail.

I tested also with explicitly configuring two queries to one host, the other with [,\{HOST.DNS\},A] and the failing one with [,failinghost-notexist.our.domain.tld,A]. The selfcheck works, the latter reports just ZBX_NOTSUPPORTED and thus cannot be parsed or monitored.
Actually, any query which returns a positive result works nicely, so that hard-configured fail-test wasn't necessary. Pity, that we don't care about those OK results, it's the fails we want to catch. Nodata() would cause other problems.

Comment by richlv [ 2014 Oct 22 ]

what would you expect that item to return upon failure ?
in any case, that's a different issue - could you please create a new bugreport ? as a minimum, documentation is lacking as https://www.zabbix.com/documentation/2.4/manual/config/items/itemtypes/zabbix_agent does not mention what happens upon failure.

Comment by Janne Korkkula [ 2014 Oct 24 ]

OK, I'll file this as another issue, as it very likely is.

Comment by Jack Stevens [ 2016 Mar 30 ]

Also get this issue - but seems to be just some domain queries:

zabbix_get -s 127.0.0.1 -k net.dns.record[8.8.8.8,example1.com,MX] returns records with no issue.

zabbix_get -s 127.0.0.1 -k net.dns.record[8.8.8.8,example2.com,MX] returns result ZBX_NOTSUPPORTED: Cannot perform DNS query.

Generated at Mon May 12 05:54:19 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.