Querying the SOA timers
Hello, I have had a bit of a Google but I have been unsuccessful in finding an answer to this one. We currently have bind acting as a slave server for a number of different zones. The owners of these zones sometimes change configuration without letting us know, resulting in zones expiring. I would like to know if there is a way to query how long is left to run on the various timers listed in the SOA. What i would like is the following information about a given zone * The Date and time the last notify was received (was it successful) * The Date and time the zone was last refreshed (was it successful) * The Date and time of the next refresh * The Date and time the zone will expire Is this information readily available in bind and if so how would i query it. If not, does anyone have any ideas about how this information could be reliably collected. This information would more then likely be used in either a nagios check or a daily email. Thank you John ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Fwd: Querying the SOA timers
On 1 February 2011 10:04, wrote: > I once wrote a perl script for nagios plugin and posted it to the list. > Just to check both master and slave's serial number to see if they are the > same to verify the zone data in every name server is correct. Hello, Thanks for this however it would be useful if i could query the timers maintained at the slave server directly as It is still possible for a slave server to have an up-to-date serial but still expire the zone. The only way i can think of getting something close to what i want is by checking the file modification time zone on disc and adding the zone expiry to that. something like the following (this assumes you have all zones in on folder and the file name is the same as the zone). however i know this is not perfect if anyone has anything better please let me know for zone in $(ls); do zone_lastupdated=$(stat -c %Z ${zone}); expiry=$(dig +short SOA ${zone} @localhost | awk '{print $6}') ; zone_expires=$((zone_lastupdated + expiry)); echo ${zone} Expires on $(date --date "$[$(date +%s)-${zone_expires}] seconds ago"); done thanks john ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Delegation question
Just re read that message and it didn't make too much sense so will try again as there is no full stop at the end of the following line ; NS ad.domain.com it would end up looking like this ;domain.com NS ad.domain.com.domain.com if you put a full stop at the end of this line see below it should work NS ad.domain.com. ad A 192.168.0.3 you could also do this NS ad ad A 192.168.0.3 ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users
Re: Delegation question
On 4 February 2011 12:28, Jean-Yves Avenard wrote: > I changed: not sure how forwarders fixed this but looking at your zone it is because you have reset your ORIGIN and not put a fuul stop at the end of the ad record domain.com. IN SOA m.domain.com. domainmaster.domain.com. ( 2011020405 ; serial 7200 ; refresh (2 hours) 1800 ; retry (30 minutes) 1209600; expire (2 weeks) 86400 ; minimum (1 day) ) NS m.domain.com. MX 0 mail.domain.com. $ORIGIN domain.com. A 192.168.0.2 ; glue record m A 192.168.0.2 mel A 192.168.0.3 ;=as there is no dit at the end of ad.domain.com this will become. put a full stop at the end of the record and it should work ;domain.com NS ad.domain.com.domain.com ; NS ad.domain.com ad A 192.168.0.3 --- ___ bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users