设为首页 收藏本站
查看: 3403|回复: 0

[经验分享] 使用Zabbix监控DNS服务器

[复制链接]

尚未签到

发表于 2015-12-24 13:25:38 | 显示全部楼层 |阅读模式
使用Zabbix监控DNS服务器
[日期:2015-02-12]来源:Linux社区  作者:john88wang[字体:大 中 小]



公司使用BIND9 作为内部DNS服务器用于日常内外网的域名解析,后期我们也会打算在外网部署DNS服务器用于解析外网服务器的内部域名,为后期自动化运维做好准备。所以对DNS的监控很有必要。
  监控原理描述
  监控BIND主要通过rndc这个工具来监控,不同版本的BIND,使用rndc显示的信息会有所不同。
  [iyunv@www ~]# whereis rndc
rndc: /usr/sbin/rndc /etc/rndc.conf /etc/rndc.key /usr/share/man/man8/rndc.8.gz
[iyunv@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
  [iyunv@www ~]# cat /etc/issue.net  
CentOS release 5.10 (Final)
Kernel \r on an \m
[iyunv@www ~]# named -v
BIND 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6
[iyunv@www ~]# rndc stats
[iyunv@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)
  [iyunv@test1 ~]# cat /etc/issue.net  
CentOS release 6.4 (Final)
Kernel \r on an \m
[iyunv@test1 ~]# named -v
BIND 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1
[iyunv@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
[iyunv@test1 ~]# rndc stats
[iyunv@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)
  一些Zabbix相关教程集合
  安装部署分布式监控系统Zabbix 2.06 http://www.iyunv.com/Linux/2013-07/86942.htm
  《安装部署分布式监控系统Zabbix 2.06》 http://www.iyunv.com/Linux/2013-07/86942.htm
  CentOS 6.3下Zabbix安装部署 http://www.iyunv.com/Linux/2013-05/83786.htm
  Zabbix分布式监控系统实践 http://www.iyunv.com/Linux/2013-06/85758.htm
  CentOS 6.3下Zabbix监控apache server-status http://www.iyunv.com/Linux/2013-05/84740.htm
  CentOS 6.3下Zabbix监控MySQL数据库参数 http://www.iyunv.com/Linux/2013-05/84800.htm
  64位CentOS 6.2下安装Zabbix 2.0.6   http://www.iyunv.com/Linux/2014-11/109541.htm
  ZABBIX 的详细介绍:请点这里
ZABBIX 的下载地址:请点这里
  本文永久更新链接地址:http://www.iyunv.com/Linux/2015-02/113295.htm

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-155737-1-1.html 上篇帖子: zabbix监控外网地址-使用zabbix icmp-ping监控网络状态 下篇帖子: zabbix监控网站的访问状态
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表