can check_bind.sh plugin handle multiple zones?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
linuser
Posts: 102
Joined: Fri Sep 18, 2015 9:53 am

can check_bind.sh plugin handle multiple zones?

Post by linuser »

As some of you know, I have been working on the check_bind.sh plugin on a lab DNS server. Had a few issues and now seems all is good. However - my last problem revolved around the plugin returning zero values when it came across stats for multiple zones in the named.stats.tmp file. Like this:

Zone "1"

Code: Select all

[localhost.localdomain]
[155.168.192.in-addr.arpa]
                  16 queries resulted in NXDOMAIN
                  16 queries resulted in nxrrset
                  66 queries resulted in authoritative answer
                  34 queries resulted in successful answer
Zone "2"

Code: Select all

[testdns.net]
++ Zone Maintenance Statistics ++
                2167 queries caused recursion
               25707 queries resulted in NXDOMAIN
                   2 queries resulted in SERVFAIL
                 204 queries resulted in nxrrset
               52725 queries resulted in non authoritative answer
                  66 queries resulted in authoritative answer
               26880 queries resulted in successful answer
               51384 responses with EDNS(0) sent
               52793 responses sent
               51384 requests with EDNS(0) received
               52793 IPv4 requests received
I was able to modify the script to ignore the stats from "localhost.localdomain", but if having more than one zone on the DNS server breaks the plugin, what happens when you have hundreds of zones on your DNS server? This is how we have it in production and I can't move forward on this until I can find a solution that works.

Question 1:
Should the script be able to handle multiple zones and still parse out the correct info?

Question 2:
If so, what needs to happen to make this work?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: can check_bind.sh plugin handle multiple zones?

Post by tmcdonald »

To be perfectly honest, I'm not 100% what the intended functionality is in this case - the original author (not us) hasn't released an upgrade since 2009 and this isn't one of the "standard" plugins we ship with XI. Grepping through the description and looking over the source I don't immediately see how multiple zones would be supported, so I don't really know what to say for what would need to be done to support it. I'll leave this thread open for further comment, but if it comes down to needing us to modify the script beyond a few simple tweaks, we would need to get the devs involved.
Former Nagios employee
linuser
Posts: 102
Joined: Fri Sep 18, 2015 9:53 am

Re: can check_bind.sh plugin handle multiple zones?

Post by linuser »

Thanks, It would not be difficult to sum up the totals with simple command line editing of the file however scripting is not my strong-suit and having the ability to look at stats on a per zone basis, then graph those, would be a use case by many I'm sure.
User avatar
lgroschen
Posts: 384
Joined: Wed Nov 27, 2013 1:17 pm

Re: can check_bind.sh plugin handle multiple zones?

Post by lgroschen »

Not sure if this would be custom development or something that someone would take on. Might just have to open an internal task to see what kind of traction it gets.
/Luke
linuser
Posts: 102
Joined: Fri Sep 18, 2015 9:53 am

Re: can check_bind.sh plugin handle multiple zones?

Post by linuser »

That would be great if we could take that approach or if someone would be willing to take this on. I have emailed the original author and have never received a reply.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: can check_bind.sh plugin handle multiple zones?

Post by lmiltchev »

I created an internal feature request (TASK ID 6522).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked