|
|
| Author |
Message |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Sat Jun 21, 2008 4:34 pm Post subject: BIND 9.5 stats remote with SSH ( without SNMP ) |
|
|
I made a script to graph BIND 9.5 stats through SSH for people like me who don't have access to their servers via SNMP.
See the perl script and the host template attached.
What does the script ?
The script open a SSH connection to the remote machine, execute "rndc stats", parse it to grab needed counters and remove it. Nothing have to be installed on the server except BIND 9.5
How to configure the script ?
You must put the script in the directory <path_cacti>/scripts/AF on the cacti server. You also should edit and modify it especially for PATHs like perl interpreter, local SSH binary and remote rndc and named.stats locations.
The cacti user must havec access to a user on the remote DNS machine via SSH with private/public key ( without password ).
What is in the template ?
See the two graphs attached
How to configure the template ?
Just import the template, and apply it to a device. Feel free to translate titles and labels that are in French.
When creting the graphs, you will be asked for a user, the user is the remote user though which cacti will open a ssh connection on the remote machine.
Where is the last version ?
The last version is now always attached in this post.
Please, tell me how I should improve the script and the template and I also would be glad if someone send me improvements.
| Description: |
|
| Filesize: |
21.73 KB |
| Viewed: |
4748 Time(s) |

|
| Description: |
|
| Filesize: |
26 KB |
| Viewed: |
4748 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
cacti_host_template_af-dns-bind_9_5.xml |
| Filesize: |
66.44 KB |
| Downloaded: |
249 Time(s) |
| Description: |
|
 Download |
| Filename: |
ssh-dns-bind95-stats.pl |
| Filesize: |
3.39 KB |
| Downloaded: |
369 Time(s) |
Last edited by gagadget on Wed Oct 15, 2008 8:37 am; edited 1 time in total |
|
| Back to top |
|
 |
chossced
Joined: 03 Jul 2008 Posts: 2
|
Posted: Thu Jul 03, 2008 10:47 am Post subject: |
|
|
Previous Cacti template for BIND monitoring doesn't work anymore with BIND 9.5
So I'm trying this new plugin
I'm using Cacti 0.8.6i
when import template => Error: XML parse error.
how to deal with that ?
Thanks.
PS: Impossible to upgrade to 0.8.7b actually
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Mon Jul 07, 2008 10:10 am Post subject: |
|
|
Made some translations, reposted it.
Last edited by gagadget on Wed Oct 15, 2008 8:39 am; edited 1 time in total |
|
| Back to top |
|
 |
chossced
Joined: 03 Jul 2008 Posts: 2
|
Posted: Tue Jul 08, 2008 5:26 am Post subject: |
|
|
hé hé,
New error
Error: XML: Hash version does not exist.
What is your version of Cacti for exporting this template.
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Tue Jul 08, 2008 3:52 pm Post subject: |
|
|
| Using 0.8.7a
|
|
| Back to top |
|
 |
erekose
Joined: 16 Sep 2008 Posts: 9
|
Posted: Tue Sep 16, 2008 7:59 pm Post subject: Empty Values |
|
|
I've recently installed this util and think it has great potential.
My only problem at the moment is that my stats come back empty, even though the named_stats file is populated with data.
Any pointers????
Stats:
+++ Statistics Dump +++ (1221613094)
success 14125070
referral 18177
nxrrset 2114660
nxdomain 9273951
recursion 6622010
failure 704197
duplicate 56451
dropped 109120
--- Statistics Dump --- (1221613094)
Results from running perl script:
A:0 AAAA:0 ANY:0 AXFR:0 CNAME:0 IXFR:0 MX:0 NS:0 PTR:0 SOA:0 SRV:0 TXT:0 success:0 nonauthoritative:0 errors:0 nxdomain:0 recursion:0 dropped:0
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Tue Sep 16, 2008 9:21 pm Post subject: |
|
|
The script is for BIND 9.5 and the last version of BIND 9.4 and looking at the named.stats file, it seems you are using an older version of BIND 9.4.
I can send/post an old version of the script that can parse this file if you want.
What version of BIND are you using ?
|
|
| Back to top |
|
 |
erekose
Joined: 16 Sep 2008 Posts: 9
|
Posted: Tue Sep 16, 2008 10:10 pm Post subject: |
|
|
| gagadget wrote: | The script is for BIND 9.5 and the last version of BIND 9.4 and looking at the named.stats file, it seems you are using an older version of BIND 9.4.
I can send/post an old version of the script that can parse this file if you want.
What version of BIND are you using ? |
Hi, I am using BIND 9.4.2-P1...I actually thought we had installed 9.5.
I'd love to see that script if I may.
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Tue Sep 16, 2008 10:24 pm Post subject: |
|
|
I'll post the script next week as I am in vacation. But the 9.4 is very limited concerning the stats.
Move to 9.5 in production only if you don't have many ACLs in many zones because BIND can eat up several gigas of RAM due to a bug that will be corrected in 9.5.1 versions ( already included in 9.5.1b1 ), here is the line in the release notes :
2373. [bug] Default values of zone ACLs were re-parsed each time a new zone was configured, causing an overconsumption of memory. [RT #18092]
|
|
| Back to top |
|
 |
erekose
Joined: 16 Sep 2008 Posts: 9
|
Posted: Thu Sep 18, 2008 2:42 am Post subject: |
|
|
| gagadget wrote: | I'll post the script next week as I am in vacation. But the 9.4 is very limited concerning the stats.
Move to 9.5 in production only if you don't have many ACLs in many zones because BIND can eat up several gigas of RAM due to a bug that will be corrected in 9.5.1 versions ( already included in 9.5.1b1 ), here is the line in the release notes :
2373. [bug] Default values of zone ACLs were re-parsed each time a new zone was configured, causing an overconsumption of memory. [RT #18092] |
No worries on waiting till next week. I appreciate your help.
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Tue Sep 23, 2008 4:26 am Post subject: |
|
|
Here is the script and the template. You can get only the global stats in 9.4 not the details of the queries.
| Description: |
|
 Download |
| Filename: |
ssh-dns-bind94-stats.pl |
| Filesize: |
1.88 KB |
| Downloaded: |
58 Time(s) |
| Description: |
|
 Download |
| Filename: |
cacti_host_template_af-dns-bind_9_4.xml |
| Filesize: |
20.69 KB |
| Downloaded: |
61 Time(s) |
|
|
| Back to top |
|
 |
erekose
Joined: 16 Sep 2008 Posts: 9
|
Posted: Tue Sep 23, 2008 9:51 pm Post subject: |
|
|
| Thanks so much!
|
|
| Back to top |
|
 |
shamrock
Joined: 24 Sep 2008 Posts: 3
|
Posted: Wed Sep 24, 2008 4:04 am Post subject: Re: BIND 9.5 stats remote with SSH ( without SNMP ) |
|
|
Hi,
I've imported your script and it seems doesn't work properly.
When it get data I see it does "rrdtool update --template ...' with only few values (it doesn't get A record nor nxdomain ). But graph trying to draw using this variables. What may goes wrong ?
Best regards,
Shamrock
|
|
| Back to top |
|
 |
gagadget Cacti User
Joined: 21 Feb 2006 Posts: 63
|
Posted: Wed Oct 01, 2008 7:22 am Post subject: |
|
|
| What version of BIND are you using ?
|
|
| Back to top |
|
 |
shamrock
Joined: 24 Sep 2008 Posts: 3
|
Posted: Wed Oct 01, 2008 11:11 am Post subject: |
|
|
| gagadget wrote: | | What version of BIND are you using ? |
9.5.-p2
Everything looks ok in logs but not with graph
|
|
| Back to top |
|
 |
|