Mon
Table of Contents
Here are the details of some Mon tests I run:
DNS
The following tests the local DNS cache. I didn’t use example.com in my real tests, I used the domain of a multi-national corporation that has a very short DNS timeout that seems related to their use of the Akamai CDN. I won’t tell people which company to use, but I’m sure that any company that can afford Akamai can afford a query from my server every 5 minutes. ;)
watch 127.0.0.1
service dnscache
description DNS caching
interval 5m
monitor dns.monitor -caching_only -query www.example.com
period
numalerts 1
alert mailxmpp.alert -x russell@coker.com.au -m russell@coker.com.au
upalert mailxmpp.alert -x russell@coker.com.au -m russell@coker.com.au
The following section of mon.cf.m4 monitors Google DNS for the validity of domains that I host on my name server. The aim of this is to catch the case where someone forgets to pay for zone renewal so that they can pay while the zone is locked before it becomes available for domain squatters. It uses M4 so it can be generated from the BIND configuration.
watch 8.8.8.8
service myzones
description check Google DNS has my zones
interval 1h
monitor dns.monitor -caching_only QUERYDOMAINS
period
numalerts 1
alert mailxmpp.alert -x russell@coker.com.au -m russell@coker.com.au
upalert mailxmpp.alert -x russell@coker.com.au -m russell@coker.com.au
The following Makefile generates a mon.cf file from the BIND configuration that monitors the www entries in zones and the first PTR entries in IPv6 reverse zones. Note that the spaces will need to be converted to a TAB if you want to cut/paste this.
all: mon.cf
mon.cf: mon.cf.m4 /etc/bind/named.conf.local Makefile
m4 -DQUERYDOMAINS="$(shell for n in $$(grep zone /etc/bind/named.conf.local|sed -e s/^zone..// -e s/\"\ .$$//|grep -v ^//| grep -v arpa$$ ; for n in $$(grep zone.*ip6.arpa /etc/bind/named.conf.local|sed -e s/^zone..// -e s/\”\ .$$//|grep -v ^//) ; do echo -query 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.$$n:PTR ; done) ; do echo -query www.$$n ; done)" mon.cf.m4 > mon.cf
/etc/init.d/mon restart
You may also like
RAM Speed according to Memtest86+
Debian Repositories
ZFS and BTRFS
Related posts:
Archives
- December 2025
- October 2025
- September 2025
- May 2024
- September 2023
- October 2022
- August 2022
- February 2022
- January 2022
- August 2021
- September 2020
- May 2020
- November 2019
- January 2019
- July 2017
- April 2016
- March 2015
- January 2015
- July 2014
- October 2012
- August 2012
- February 2012
- August 2011
- January 2011
- June 2010
- May 2010
- April 2010
- October 2009
- January 2009
- December 2008
- July 2008
- June 2008
- May 2008
- April 2008
- January 2008
- December 2007
- November 2007
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 |
| 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| 16 | 17 | 18 | 19 | 20 | 21 | 22 |
| 23 | 24 | 25 | 26 | 27 | 28 | 29 |
| 30 | 31 | |||||
Leave a Reply
You must be logged in to post a comment.