Use cactiez to monitor DNS (bind9) --- attached Template
1. Configure the BIND status output file
statistics-file "/var/run/named.stats";
Status output file
2. Download the template in the attachment and unpack it.
Import cacti_host_template_bind9_7.xml to cactiez
650) This. width = 650; "width =" 554 "Height =" 269 "src =" http://s3.51cto.com/wyfs02/M02/4D/3B/wKioL1RN-kvyWkfPAANEdv8Q1A8798.jpg "style =" Background: URL ("/e/u261/lang/ZH-CN/images/localimage.png") No-repeat center; Border: 1px solid # DDD; "alt =" spacer.gif "Title =" image 1.png "/>
3. Install the SNMP service directly through yum
yum -y install net-snmp-*
4. Configure the SNMP file. In the SNMP configuration file, add extend. 1.3.6.1.4.1.18689.0.1 Dnscache-stats/usr/local/bin/runstats. Sh as follows,
com2sec notConfigUser default publicgroup notConfigGroup v1 notConfigUsergroup notConfigGroup v2c notConfigUserview all included .1access notConfigGroup "" any noauth exact all none noneextend .1.3.6.1.4.1.18689.0.1 dnscache-stats /usr/local/bin/runstats.sh
-
5. Copy the runstats. SH and dnsstats. pl files in the template to the bind host to be monitored (recommended directory/usr/local/bin) and grant the execution permission.
6. Add a scheduled task
*/1 * * * * /usr/local/bin/runstats.sh > /dev/null 2>&1
# Add a scheduled task
7. Copy the bind-stats.sh file to cactiez monitoring,/var/www/html/scripts/bind-stats.sh, and modify group numbers and related information in the script.
8. Enter the command on the DNS server
snmpwalk -v2c -c public localhost 1.3.6.1.4.1.18689.0.1
To test whether SNMP information can be read normally.
650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/4D/3B/wKioL1RN-maAbnsiAAYy3K9rBtc911.jpg "Title =" image 2.png "alt =" wKioL1RN-maAbnsiAAYy3K9rBtc911.jpg "/>
This article from the "comefrom erlong Yamanashi/seven door" blog, please be sure to keep this source http://zj1991.blog.51cto.com/1847949/1568484
Use cactiez to monitor DNS (bind9) --- attached Template