Why does the name server stats file, the one that the script parses (usually /tmp/named.stats.tmp), have to different Statistic Dumps? For instance
Code: Select all
grep -i 'statistics dump' /tmp/named.stats.tmp
--- Statistics Dump --- (1450819456)
+++ Statistics Dump +++ (1450819456)
--- Statistics Dump --- (1450819269)
+++ Statistics Dump +++ (1450819269)
Next question is why does the check_bind.sh script seem to take the difference between different types of query responses? For instance on successful queries why does it want the difference in the 2 lines of output? Why not just take the total number from the last dump stat in the file, report that to nagios? Even that way, you would still get different values each time it updates.
Code: Select all
if [ "$succ_1st" == '' ]
then
success=0
else
success=`expr $succ_1st - $succ_2nd`
fi