[ZBX-26328] Add logging of the reverse dns lookup performed when trapper is checking for host (active checks) Created: 2025 Apr 17 Updated: 2025 Jul 15 |
|
| Status: | Need info |
| Project: | ZABBIX BUGS AND ISSUES |
| Component/s: | Proxy (P), Server (S) |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Problem report | Priority: | Trivial |
| Reporter: | Piotr Zakrzewski | Assignee: | Piotr Zakrzewski |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Description |
|
Version where reported: 6.0.33 When performing Active Checks, there is a reverse-DNS lookup being made, but there's no indication of that in logs. While performance of Zabbix Proxy decreased for unknown reason, it seemed that this query: select h.hostid,h.status,h.tls_accept,h.tls_issuer,h.tls_subject,h.tls_psk_identity,a.host_metadata,a.listen_ip,a.listen_dns,a.listen_port,a.flags from hosts h left join autoreg_host a on a.proxy_hostid is null and a.host=h.host where h.host='FVXXXXXXXXXX' and h.status in (0,1) and h.flags<>2 and h.proxy_hostid is null]
is taking very long to execute, but in fact it was very fast (2s), while the whole operation is logged for ~8s in logs. The reason for it taking so long, was one of the DNS servers was slow. It has been checked with packet capture that there indeed is a reverse-dns lookup being made, when performing that active check, but it's not being logged. There's a request to include in logs, that the the DNS lookup is being performed.
Steps to reproduce:
Result: Expected: |
| Comments |
| Comment by Alexander Vladishev [ 2025 Jul 15 ] |
|
Logging calls to such low-level functions could lead to extremely heavy log file growth. I don't think that's a good idea. In the latest version, 6.0.40, additional debug output has already been added for the db_register_host() function, which directly performs the DNS query and inserts a record into the "proxy_autoreg_host" or "autoreg_host" table. This somewhat narrows down the search for the cause of the delay. Would that be sufficient? |