Check_bind.sh plugin and name server stats question
Posted: Tue Dec 22, 2015 4:35 pm
I am trying to gain a better understanding of the name server stats file and why the check_bind.sh script works the way it does. My first question is:
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
What is the significance of have 2 dumps? Why not 1? Why not 3 or 4?
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.
I am just trying to figure out if there is some kind of rhyme or reason to all this.
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