On 1 February 2011 10:04, <p...@mail.nsbeta.info> 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