Skip to content

Instantly share code, notes, and snippets.

View dgl's full-sized avatar

David Leadbeater dgl

View GitHub Profile
@dgl
dgl / README.md
Created July 25, 2010 18:08
PowerDNS MySQL monitoring

Simple PowerDNS MySQL replication monitoring

Replace domain in "ucheck.domain" with a domain of yours in both the SQL below and ucheck-check.sh. Normally use the one the DNS servers are in (this assumes your servers are called a.ns.domain, b.ns.domain, etc, change in ucheck-check.sh).

Do something like this in MySQL:

CREATE SQL SECURITY DEFINER VIEW ucheck AS
  SELECT id, domain_id, name,type, content, ttl, prio, change_date from records where (name = 'ucheck.domain') WITH CASCADED CHECK OPTION;

GRANT UPDATE on pdns.ucheck to ucheck@localhost;