Use Zabbix to monitor DNS servers
The company uses BIND9 as the internal DNS server for daily internal and external domain name resolution. In the future, we will also plan to deploy the DNS server on the Internet to resolve the internal domain name of the internet server, so as to prepare for future automated O & M. Therefore, it is necessary to monitor DNS.
Monitoring principle description
The tool rndc is used to monitor the BIND. The information displayed by rndc varies with the version of the BIND.
[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
The default bind version of CentOS5 series is 9.3, and the default bind version of CentOS6 series is 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 client: 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
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 ed
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-100 ms
14 queries with RTT 100-500 ms
[View: _ bind]
++ Cache DB RRsets ++
[View: default]
49
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)
Some Zabbix Tutorials:
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy the distributed monitoring system Zabbix 2.06
Install and deploy Zabbix in CentOS 6.3
Zabbix distributed monitoring system practice
Under CentOS 6.3, Zabbix monitors apache server-status
Monitoring MySQL database Parameters Using Zabbix in CentOS 6.3
Install Zabbix 2.0.6 in 64-bit CentOS 6.2
ZABBIX details: click here
ZABBIX: click here
This article permanently updates the link address: