Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Mon Jul 24, 2017 10:02 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Anyone have a template for djbdns(dnscache)with dnsstats.pl?
PostPosted: Fri Dec 16, 2005 3:11 pm 
Offline

Joined: Tue Nov 15, 2005 8:57 am
Posts: 14
I'm using Jeremy Kister's dnsstats tool at:

http://jeremy.kister.net/code/djbdns-stats/

I've got the everything setup on the dns server, and snmpd is presenting the data in one OID like this:

A:80 NS:0 CNAME:0 SOA:33 PTR:3 MX:4 TXT:0 AAAA:0 SRV:1 NAPTR:0 A6:0 IXFR:0 AXFR:0 ANY:0 effectiveness:109 other:0 total:121

I need to parse the data somehow in cacti, but don't know how.


Top
 Profile  
 
 Post subject: Re: Anyone have a template for djbdns(dnscache)with dnsstats
PostPosted: Fri Dec 16, 2005 4:38 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Buckbeak wrote:
A:80 NS:0 CNAME:0 SOA:33 PTR:3 MX:4 TXT:0 AAAA:0 SRV:1 NAPTR:0 A6:0 IXFR:0 AXFR:0 ANY:0 effectiveness:109 other:0 total:121

I need to parse the data somehow in cacti, but don't know how.
Well, to be honest, you won't need any parsing in cacti cause this is _exactly_ the format cacti requires (never seen that before). You may define a simple one-liner that queries this OID and returns the string literally. Define a Data Input Method that refers to that one liner and define an output var for each value A, NS, CNAME etc. you want to have.
Then, it goes as usual
- define a Data Template for storing all wanted readings
- define a Graph Template for presentating the readings
Associate the Graph Template to your device (directly or indirectly using a Host Template)
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 19, 2005 2:35 pm 
Offline

Joined: Tue Nov 15, 2005 8:57 am
Posts: 14
I simple one liner what? Can you be more specific? I'm brand new to Cacti.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 9:46 am 
Offline

Joined: Tue Nov 15, 2005 8:57 am
Posts: 14
Here's what I came up with in case anyone else needs it:

#!/bin/sh

/usr/local/bin/snmpget -v1 -Ovqa -c communityname $1 .1.3.6.1.4.1.18689.0.1.3.1.1.14.100
.110.115.99.97.99.104.101.45.115.116.97.116.115 | sed 's/"//;s/"$//'


The last bit chops off the quotes at the beginning and end.
The OID is one continuous string (the message board is splitting it up).


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 1:23 pm 
Offline
Developer
User avatar

Joined: Thu Dec 02, 2004 2:46 am
Posts: 22461
Location: Muenster, Germany
Congratulations!
Did you make it with the other steps? If not, please post.
Reinhard

_________________
Official Cacti Documentation
Official Debugging Help
Central Plugin Repository
Central Templates Repository


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 4:41 pm 
Offline

Joined: Tue Nov 15, 2005 8:57 am
Posts: 14
I'm making progress, but still no go.

I've created an input method, (shown below), and a data source with multiple data source items, but the graphs aren't working and the correct rrd file is not even in the rra directory. I have been able to get the graph working with a single datasource item (A), but not with multiple items. It's strange that the datasource appear to be created but there is no rrd file.


Attachments:
cacti3.gif
cacti3.gif [ 2.23 KiB | Viewed 29837 times ]
cacti2.gif
cacti2.gif [ 24.86 KiB | Viewed 29837 times ]
cacti1.gif
cacti1.gif [ 18.02 KiB | Viewed 29837 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 20, 2005 5:02 pm 
Offline

Joined: Tue Nov 15, 2005 8:57 am
Posts: 14
one more...


Attachments:
cacti4.gif
cacti4.gif [ 13.2 KiB | Viewed 29834 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Wed May 31, 2006 6:44 pm 
Offline

Joined: Sat May 20, 2006 8:06 pm
Posts: 17
Working great on gentoo linux!!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 11, 2007 8:46 pm 
Offline

Joined: Tue Sep 11, 2007 8:40 pm
Posts: 1
Funny as it may sound, I created djbdns-stats to work with cacti, but I haven't a clue how to configure cacti for it.

I've created simple objects in cacti, but haven't the first clue on how to efficiently integrate the djbdns stats.

Can someone give me a step-by-step (every needed click) to get cacti polling a host with djbdns-stats ?

I will include the howto along with credit in an upcoming release of djbdns-stats.

Thanks,

Jeremy


Top
 Profile  
 
 Post subject: djbdns-stats template
PostPosted: Sun Jun 15, 2008 1:05 pm 
Offline
User avatar

Joined: Thu Nov 07, 2002 7:11 pm
Posts: 27
Location: Los Angeles, CA USA
I have created a template for graphing all of the data returned by the excellent djbdns-stats scripts. Please let me know if you have any questions.

Thanks!

-Dave


Attachments:
File comment: A screenshot (I just got it working so not much data, but you get the idea. Also I need to make the colors prettier. =]
graph_image.php.png
graph_image.php.png [ 57.85 KiB | Viewed 24573 times ]
File comment: The template.
djbdns-stats_cacti.zip [10.51 KiB]
Downloaded 849 times
Top
 Profile  
 
 Post subject: Re: djbdns-stats template
PostPosted: Thu Aug 21, 2008 2:14 pm 
Offline

Joined: Thu Aug 21, 2008 2:01 pm
Posts: 1
eecue wrote:
I have created a template for graphing all of the data returned by the excellent djbdns-stats scripts. Please let me know if you have any questions.

Thanks!

-Dave


---

Thanks again for the template, that saved a lot of work. I think I found a problem with the djbdns-stats.sh script though.

Your query within that script,
/usr/local/bin/snmpget -v1 -Oaqv -c public $1 .1.3.6.1.4.1.18689.1.2.3.1.1.13.116.105.110.121.100.110.115.45.115.116.97.116.115 | sed 's/"//;s/"$//'

returned:

Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: SNMPv2-SMI::enterprises.18689.1.2.3.1.1.13.116.105.110.121.100.110.115.45.115.116.97.116.115

The prior snmget that BuckBeak did prior on this page worked fine.
#!/bin/sh

/usr//bin/snmpget -v1 -Ovqa -c communityname $1 .1.3.6.1.4.1.18689.0.1.3.1.1.14.100.110.115.99.97.99.104.101.45.115.116.97.116.115 | sed 's/"//;s/"$//'

returned:
A:5187 NS:0 CNAME:0 SOA:0 PTR:55 MX:7 TXT:0 AAAA:480 SRV:0 NAPTR:0 A6:0 IXFR:0 AXFR:0 ANY:0 effectiveness:190 other:0 total:5729

ps. I am on a Redhat Clone


Top
 Profile  
 
 Post subject:
PostPosted: Sat Feb 07, 2009 6:21 am 
Offline

Joined: Thu Jun 05, 2008 8:53 pm
Posts: 35
Hi Everyone,

I am trying to get this script to work. It is currently configured on the DNS server and running the stat script gives me the following output

Code:
# sh /var/www/html/scripts/djbdns-stats.sh the-dns
A:1 NS:5 ME:0 SOA:0 PTR:0 MX:0 TXT:120 AAAA:0 SRV:0 NAPTR:0 A6:0 IXFR:0 AXFR:0 ANY:0 effectiveness:0 other:0 total:130


The output seems fine but yet the graph is empty and the rrd file has UNKN values

Code:
rrd_version = "0003"
step = 60
last_update = 1234004832
ds[tinydns_A].type = "GAUGE"
ds[tinydns_A].minimal_heartbeat = 120
ds[tinydns_A].min = 0.0000000000e+00
ds[tinydns_A].max = 1.0000000000e+04
ds[tinydns_A].last_ds = "UNKN"
ds[tinydns_A].value = 0.0000000000e+00
ds[tinydns_A].unknown_sec = 12
ds[tinydns_NS].type = "GAUGE"
ds[tinydns_NS].minimal_heartbeat = 120
ds[tinydns_NS].min = 0.0000000000e+00
ds[tinydns_NS].max = 1.0000000000e+04
ds[tinydns_NS].last_ds = "UNKN"


Could you kindly assist me getting this to work

Thank you


Top
 Profile  
 
 Post subject:
PostPosted: Wed Feb 24, 2010 1:21 pm 
Offline

Joined: Wed Apr 04, 2007 10:31 am
Posts: 5
Thanks for all the input which got me going.
If you're on CentOS 5.4 with 5.3 net-snmp, then this will work for you and it is working for me.

It seems to me that with different version of net-snmp, you will likely have to tweak the OID in /etc/snmp/snmpd.conf.


Attachments:
File comment: tinydns & dnscache template.
cacti-djbdns.tar.gz [7.34 KiB]
Downloaded 473 times
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group