Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


BIND 9.5 stats remote with SSH ( without SNMP )
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
gagadget
Cacti User


Joined: 21 Feb 2006
Posts: 63

PostPosted: Sat Jun 21, 2008 4:34 pm    Post subject: BIND 9.5 stats remote with SSH ( without SNMP ) Reply with quote

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.



2.png
 Description:
 Filesize:  21.73 KB
 Viewed:  4727 Time(s)

2.png



1.png
 Description:
 Filesize:  26 KB
 Viewed:  4727 Time(s)

1.png



cacti_host_template_af-dns-bind_9_5.xml
 Description:

Download
 Filename:  cacti_host_template_af-dns-bind_9_5.xml
 Filesize:  66.44 KB
 Downloaded:  249 Time(s)


ssh-dns-bind95-stats.pl
 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

PostPosted: Thu Jul 03, 2008 10:47 am    Post subject: Reply with quote

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

PostPosted: Mon Jul 07, 2008 10:10 am    Post subject: Reply with quote

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

PostPosted: Tue Jul 08, 2008 5:26 am    Post subject: Reply with quote

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

PostPosted: Tue Jul 08, 2008 3:52 pm    Post subject: Reply with quote

Using 0.8.7a
Back to top
erekose



Joined: 16 Sep 2008
Posts: 9

PostPosted: Tue Sep 16, 2008 7:59 pm    Post subject: Empty Values Reply with quote

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

PostPosted: Tue Sep 16, 2008 9:21 pm    Post subject: Reply with quote

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

PostPosted: Tue Sep 16, 2008 10:10 pm    Post subject: Reply with quote

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

PostPosted: Tue Sep 16, 2008 10:24 pm    Post subject: Reply with quote

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

PostPosted: Thu Sep 18, 2008 2:42 am    Post subject: Reply with quote

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

PostPosted: Tue Sep 23, 2008 4:26 am    Post subject: Reply with quote

Here is the script and the template. You can get only the global stats in 9.4 not the details of the queries.


ssh-dns-bind94-stats.pl
 Description:

Download
 Filename:  ssh-dns-bind94-stats.pl
 Filesize:  1.88 KB
 Downloaded:  58 Time(s)


cacti_host_template_af-dns-bind_9_4.xml
 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

PostPosted: Tue Sep 23, 2008 9:51 pm    Post subject: Reply with quote

Thanks so much!
Back to top
shamrock



Joined: 24 Sep 2008
Posts: 3

PostPosted: Wed Sep 24, 2008 4:04 am    Post subject: Re: BIND 9.5 stats remote with SSH ( without SNMP ) Reply with quote

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

PostPosted: Wed Oct 01, 2008 7:22 am    Post subject: Reply with quote

What version of BIND are you using ?
Back to top
shamrock



Joined: 24 Sep 2008
Posts: 3

PostPosted: Wed Oct 01, 2008 11:11 am    Post subject: Reply with quote

gagadget wrote:
What version of BIND are you using ?

9.5.-p2
Everything looks ok in logs but not with graph
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 



Powered by phpBB © 2001, 2005 phpBB Group