weiliwei 发表于 2015-12-24 13:25:38

使用Zabbix监控DNS服务器

使用Zabbix监控DNS服务器
[日期:2015-02-12]来源:Linux社区作者:john88wang[字体:大 中 小]


公司使用BIND9 作为内部DNS服务器用于日常内外网的域名解析,后期我们也会打算在外网部署DNS服务器用于解析外网服务器的内部域名,为后期自动化运维做好准备。所以对DNS的监控很有必要。
  监控原理描述
  监控BIND主要通过rndc这个工具来监控,不同版本的BIND,使用rndc显示的信息会有所不同。
  # whereis rndc
rndc: /usr/sbin/rndc /etc/rndc.conf /etc/rndc.key /usr/share/man/man8/rndc.8.gz
# whatis rndc
rndc                (8)- name server control utility
rndc-confgen      (8)- rndc key generation tool
rndc.conf     (5)- rndc configuration file
  CentOS5系列默认的BIND版本是9.3,CentOS6系列默认的BIND版本是9.8
  # cat /etc/issue.net
CentOS release 5.10 (Final)
Kernel \r on an \m
# named -v
BIND 9.3.6-P1-RedHat-9.3.6-20.P1.el5_8.6
# rndc stats
# 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)
  # cat /etc/issue.net
CentOS release 6.4 (Final)
Kernel \r on an \m
# named -v
BIND 9.8.2rc1-RedHat-9.8.2-0.30.rc1.el6_6.1
# 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
# rndc stats
# cat /var/named/data/named_stats.txt
+++ Statistics Dump +++ (1419998423)
++ Incoming Requests ++
++ Incoming Queries ++
++ Outgoing Queries ++

                  20 A
                  12 NS
                  21 AAAA
                  14 DNSKEY

++ Name Server Statistics ++
++ Zone Maintenance Statistics ++
++ Resolver Statistics ++


                  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

++ Cache DB RRsets ++

                  49 A
                  11 NS
                  29 AAAA
                  8 DS
                  17 RRSIG
                  2 DNSKEY

++ 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]
查看完整版本: 使用Zabbix监控DNS服务器