BIND 9 stats remote with SSH ( without using SNMP )

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

gagadget
Cacti User
Posts: 71
Joined: Tue Feb 21, 2006 9:40 am

Post by gagadget »

What gives you the script when executed on the command line of the cacti server ?
barahona
Posts: 6
Joined: Thu May 11, 2006 5:51 am

Re: BIND 9.5 stats remote with SSH ( without SNMP )

Post by barahona »

Same problem here with A records. There is problem with the template in the A records (nxdomain was working ok for us). I have fixed by hand and for me everything is now working. I have attach the new one. Feel free to make a diff to see changes.

Delete by hand all related bind9 templates and graphs, import the new template and create the graphs.

By the way, great script and template. Thank you very much. :-)

Regards
shamrock wrote: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
:D :D
Attachments
cacti_host_template_af_dns_bind_9_5_196_fixed.xml
(66.44 KiB) Downloaded 3420 times
gagadget
Cacti User
Posts: 71
Joined: Tue Feb 21, 2006 9:40 am

Post by gagadget »

Just to know, how did you fix the template ?

I'll post the fix in the first page. Moreover, I should rewrite things so you don't have "AF" references any more.
Alux
Posts: 4
Joined: Tue Mar 31, 2009 12:30 pm

Not Graph

Post by Alux »

Dear All

Regarding to your installation guide

I Copied .pl script in my <cacti-path>/scripts/AF/

then i import XML File

in my cacti server when i run perl script manually in command line

The result look like this...

Code: Select all

[root@cacti ~]# perl /var/www/html/cacti/scripts/AF/ssh-dns-bind9-5.pl
rm: /opt/namesurfer/named/namedb/statistics not removed: Permission denied
A:276050431 AAAA:10658980 ANY:2224034 AXFR:12 CNAME:16276 IXFR:0 MX:19112838 NS:471077 PTR:25047922 SOA:2137773 SRV:2973384 TXT:3138889 success:338553055 nonauthoritative:306910585 errors:29256493 nxdomain:45914324 recursion:84511525 dropped:223473
[root@cacti ~]#
I Create both graphs
but there isn't any values in my graphs

They are empty

my dns server Sun Solaris 10

my cacti on Centos 5.2 with cacti last version

I set my perl script to login with user cacti to dns server

and my cacti run as root !

and i could ssh to my solaris box without password with both my user root & Cacti



Thanks in advance and sorry for my poor English.
Alux
Posts: 4
Joined: Tue Mar 31, 2009 12:30 pm

!

Post by Alux »

any body here?
gagadget
Cacti User
Posts: 71
Joined: Tue Feb 21, 2006 9:40 am

Post by gagadget »

Yes, sorry. Don't hesitate to send me a PM besause I don't come here very often.

How do you call the script ? Without any arguments ?

It seems that the user cacti don't have the permission to delete the "/opt/namesurfer/named/namedb/statistics" file on the remote machine.

You have to use a user with sufficent permissions on the files generated by BIND on the remote machine.

Can you do a "ls -l /opt/namesurfer/named/namedb/statistics" on the remote machine and post the result ?
blu3fish
Posts: 6
Joined: Mon Sep 15, 2008 12:33 pm
Location: San Francisco, CA
Contact:

NAN in graphs

Post by blu3fish »

Hi,

So the script seems to work. I execute it manually and get results. RNDC permissions are fine. I've run ssh w/ -v just to double check things weren't screwy.

There are NO errors encountered when manually running all this stuff.

But graphs still do not graph, variables stay as NAN.

Any help appreciated. Not sure what else to try/check.

Cheers,
Brennan
blu3fish
Posts: 6
Joined: Mon Sep 15, 2008 12:33 pm
Location: San Francisco, CA
Contact:

Re: NAN in graphs

Post by blu3fish »

blu3fish wrote:Hi,

So the script seems to work. I execute it manually and get results. RNDC permissions are fine. I've run ssh w/ -v just to double check things weren't screwy.

There are NO errors encountered when manually running all this stuff.

But graphs still do not graph, variables stay as NAN.

Any help appreciated. Not sure what else to try/check.

Cheers,
Brennan
Ah, I'm dumb.

Forgot to define my path to perl in the script. -10 admin points.
semisonic
Posts: 1
Joined: Sun Jul 18, 2010 7:46 pm

Can't get script to work with bind 9.4

Post by semisonic »

Hey guys,

I can't get this to work.. The script outputs ok but the graphs r blank..
Running Bind 9.4

I have setup the 9.4 template and put in the username n password but there's no numbers on the graph

Here is the output if i run the script manually
./ssh-dns-bind94-stats.pl -h xxxxxx -u cacti
total:34080 nxdomain:829 recursion:81 failure:20418

Here is the cacti.log output

07/19/2010 10:45:05 AM - CMDPHP: Poller[0] Host[27] DS[652] CMD: /usr/share/cacti/site/scripts/AF/ssh-dns-bind94-stats.pl -h xxxxxx -u cacti, output: U

Any ideas

Cheers
Sonic
Mattza
Posts: 23
Joined: Wed Nov 11, 2009 2:46 am

Post by Mattza »

Hello,

I have a couple of problems with this script. First of all when i try to parse the XML file both to 9.4 and 9.5 Bind i get following error: "XML parse error". The path is correct to script and cant find anything wierd in the xml file. Cacti Version: 0.8.7g

i have BIND 9.4.3-P3 on a Red Hat server. When i run the .pl file i get following output:

total:0 nxdomain:0 recursion:0 failure:0

But when i look in the statistics file on DNS-server there is alot of requests.. No error thou, just no output.

Anyone who can help?

Cheers // Mattias
Mattza
Posts: 23
Joined: Wed Nov 11, 2009 2:46 am

Post by Mattza »

Is this thread dead?
dj_seijin
Posts: 7
Joined: Tue Mar 15, 2005 9:25 am

Re: BIND 9.5 stats remote with SSH ( without SNMP )

Post by dj_seijin »

Hi All , Im using bind 9.6.2 and Cacti Version 0.8.7e...

In cacti.log show output


A:999722 AAAA:76563 ANY:4438 AXFR:0 CNAME:635 IXFR:0 MX:108393 NS:17437 PTR:359783 SOA:7880 SRV:11987 TXT:72870 success:1663312 nonauthoritative:921040 errors:229740 nxdomain:455462 recursion:445271 dropped:35

But grahp show other values,,,,what im doing wrong???


Image
gagadget
Cacti User
Posts: 71
Joined: Tue Feb 21, 2006 9:40 am

Re: BIND 9.5 stats remote with SSH ( without SNMP )

Post by gagadget »

dj_seijin wrote:Hi All , Im using bind 9.6.2 and Cacti Version 0.8.7e...

In cacti.log show output


A:999722 AAAA:76563 ANY:4438 AXFR:0 CNAME:635 IXFR:0 MX:108393 NS:17437 PTR:359783 SOA:7880 SRV:11987 TXT:72870 success:1663312 nonauthoritative:921040 errors:229740 nxdomain:455462 recursion:445271 dropped:35

But grahp show other values,,,,what im doing wrong???


Image
This is totally normal as BIND counters are cumulative et don't reset to zero when you request them.

So you can't match BIND counters and Cacti graph values unless you do the math youself.
gagadget
Cacti User
Posts: 71
Joined: Tue Feb 21, 2006 9:40 am

Re:

Post by gagadget »

Mattza wrote:Is this thread dead?
Sorry for late answer, do you still have the issue ?
Mattza
Posts: 23
Joined: Wed Nov 11, 2009 2:46 am

Re: BIND 9 stats remote with SSH ( without using SNMP )

Post by Mattza »

Unfortnatly yes. Havent had any time to look at it either. So if you know what may be the problem please tell me, else dont put too much effort to it. Thanks!
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests