Build precise queries to find exactly what you need
Press ESC to close
Just my +2 Cents. The script doesnt’ truncate the stats file from rndc stats command. As result after several years I noticed that /var/named/data/named_stats.txt increased to 1,5G and when the script within icinga tries to run this script it take about 2 minutes before tac command load all the file into the memory to perform awk action. Of course icinga tries to kill the script after 60 seconds timeout and produces error. I have modified a script a little a bit, so the named statistics file will be purged everytime after check_bind.sh is executed:
[root@dns2 ~]# diff -u /usr/lib64/nagios/plugins/site/privileged/check_bind.sh ./check_bind.sh — /usr/lib64/nagios/plugins/site/privileged/check_bind.sh 2021-11-08 15:20:32.365380038 +0100 +++ ./check_bind.sh 2021-11-09 13:44:52.301734327 +0100 @@ -143,6 +143,7 @@ then sudo chroot $path_chroot $path_rndc/rndc stats else + test -f $path_stats/named_stats.txt && truncate –size 0 $path_stats/named_stats.txt sudo $path_rndc/rndc stats fi }
We’ve completely redesigned the world’s largest repository of Nagios plugins and monitoring tools. Join thousands of users sharing monitoring solutions for servers, applications, and everything in between.
Due to our redesign, all existing accounts require a password reset to access your account again.
Ready to explore 6,100+ projects and contribute to the community?
Reset Password Create Account
Happy Monitoring!