前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用Zabbix监控DNS服务器

使用Zabbix监控DNS服务器

作者头像
星哥玩云
发布2022-07-04 13:02:28
1.1K0
发布2022-07-04 13:02:28
举报
文章被收录于专栏:开源部署

公司使用BIND9 作为内部DNS服务器用于日常内外网的域名解析,后期我们也会打算在外网部署DNS服务器用于解析外网服务器的内部域名,为后期自动化运维做好准备。所以对DNS的监控很有必要。

监控原理描述

监控BIND主要通过rndc这个工具来监控,不同版本的BIND,使用rndc显示的信息会有所不同。

[root@www ~]# whereis rndc rndc: /usr/sbin/rndc /etc/rndc.conf /etc/rndc.key /usr/share/man/man8/rndc.8.gz [root@www ~]# whatis rndc rndc                (8)  - name server control utility rndc-confgen        (8)  - rndc key generation tool rndc.conf [rndc]    (5)  - rndc configuration file

CentOS5系列默认的BIND版本是9.3,CentOS6系列默认的BIND版本是9.8

[root@www ~]# cat /etc/issue.net  CentOS release 5.10 (Final) Kernel \r on an \m [root@www ~]# named -v BIND 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6 [root@www ~]# rndc stats [root@www ~]# cat  /var/named/chroot/var/named/data/named_stats.txt  +++ Statistics Dump +++ (1419998880) success 59887 referral 0 nxrrset 7457 nxdomain 8143 recursion 36479 failure 2358 --- Statistics Dump --- (1419998880)

[root@test1 ~]# cat /etc/issue.net  CentOS release 6.4 (Final) Kernel \r on an \m [root@test1 ~]# named -v BIND 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 [root@test1 ~]# rndc status version: 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1 CPUs found: 2 worker threads: 2 number of zones: 19 debug level: 0 xfers running: 0 xfers deferred: 0 soa queries in progress: 0 query logging is OFF recursive clients: 0/0/1000 tcp clients: 0/100 server is up and running [root@test1 ~]# rndc stats [root@test1 ~]# cat /var/named/data/named_stats.txt  +++ Statistics Dump +++ (1419998423) ++ Incoming Requests ++ ++ Incoming Queries ++ ++ Outgoing Queries ++ [View: default]                   20 A                   12 NS                   21 AAAA                   14 DNSKEY [View: _bind] ++ Name Server Statistics ++ ++ Zone Maintenance Statistics ++ ++ Resolver Statistics ++ [Common] [View: default]                   37 IPv4 queries sent                   30 IPv6 queries sent                   24 IPv4 responses received                   36 query retries                   13 query timeouts                   12 IPv4 NS address fetches                   15 IPv6 NS address fetches                   3 IPv4 NS address fetch failed                   2 IPv6 NS address fetch failed                   4 DNSSEC validation attempted                   4 DNSSEC validation succeeded                   10 queries with RTT 10-100ms                   14 queries with RTT 100-500ms [View: _bind] ++ Cache DB RRsets ++ [View: default]                   49 A                   11 NS                   29 AAAA                   8 DS                   17 RRSIG                   2 DNSKEY [View: _bind (Cache: _bind)] ++ Socket I/O Statistics ++                   38 UDP/IPv4 sockets opened                   31 UDP/IPv6 sockets opened                   2 TCP/IPv4 sockets opened                   2 TCP/IPv6 sockets opened                   37 UDP/IPv4 sockets closed                   30 UDP/IPv6 sockets closed                   11 TCP/IPv4 sockets closed                   30 UDP/IPv6 socket connect failures                   37 UDP/IPv4 connections established                   12 TCP/IPv4 connections accepted                   30 UDP/IPv6 send errors ++ Per Zone Query Statistics ++ --- Statistics Dump --- (1419998423)

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档