|
|
| Author |
Message |
Buckbeak
Joined: 15 Nov 2005 Posts: 13
|
Posted: Fri Dec 16, 2005 3:11 pm Post subject: Anyone have a template for djbdns(dnscache)with dnsstats.pl? |
|
|
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.
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 15639 Location: Muenster, Germany
|
Posted: Fri Dec 16, 2005 4:38 pm Post subject: Re: Anyone have a template for djbdns(dnscache)with dnsstats |
|
|
| 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
|
|
| Back to top |
|
 |
Buckbeak
Joined: 15 Nov 2005 Posts: 13
|
Posted: Mon Dec 19, 2005 2:35 pm Post subject: |
|
|
| I simple one liner what? Can you be more specific? I'm brand new to Cacti.
|
|
| Back to top |
|
 |
Buckbeak
Joined: 15 Nov 2005 Posts: 13
|
Posted: Tue Dec 20, 2005 9:46 am Post subject: |
|
|
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).
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 15639 Location: Muenster, Germany
|
Posted: Tue Dec 20, 2005 1:23 pm Post subject: |
|
|
Congratulations!
Did you make it with the other steps? If not, please post.
Reinhard
|
|
| Back to top |
|
 |
Buckbeak
Joined: 15 Nov 2005 Posts: 13
|
Posted: Tue Dec 20, 2005 4:41 pm Post subject: |
|
|
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.
| Description: |
|
| Filesize: |
2.23 KB |
| Viewed: |
14853 Time(s) |

|
| Description: |
|
| Filesize: |
24.86 KB |
| Viewed: |
14853 Time(s) |

|
| Description: |
|
| Filesize: |
18.02 KB |
| Viewed: |
14853 Time(s) |

|
|
|
| Back to top |
|
 |
Buckbeak
Joined: 15 Nov 2005 Posts: 13
|
Posted: Tue Dec 20, 2005 5:02 pm Post subject: |
|
|
one more...
| Description: |
|
| Filesize: |
13.2 KB |
| Viewed: |
14850 Time(s) |

|
|
|
| Back to top |
|
 |
giovanni
Joined: 20 May 2006 Posts: 17
|
Posted: Wed May 31, 2006 6:44 pm Post subject: |
|
|
| Working great on gentoo linux!!!
|
|
| Back to top |
|
 |
jkister
Joined: 11 Sep 2007 Posts: 1
|
Posted: Tue Sep 11, 2007 8:46 pm Post subject: |
|
|
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
|
|
| Back to top |
|
 |
eecue
Joined: 07 Nov 2002 Posts: 27 Location: Los Angeles, CA USA
|
Posted: Sun Jun 15, 2008 1:05 pm Post subject: djbdns-stats template |
|
|
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
| Description: |
| A screenshot (I just got it working so not much data, but you get the idea. Also I need to make the colors prettier. =] |
|
| Filesize: |
57.85 KB |
| Viewed: |
9589 Time(s) |

|
| Description: |
|
 Download |
| Filename: |
djbdns-stats_cacti.zip |
| Filesize: |
10.51 KB |
| Downloaded: |
423 Time(s) |
|
|
| Back to top |
|
 |
byunique
Joined: 21 Aug 2008 Posts: 1
|
Posted: Thu Aug 21, 2008 2:14 pm Post subject: Re: djbdns-stats template |
|
|
| 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
|
|
| Back to top |
|
 |
SecuringStuff
Joined: 05 Jun 2008 Posts: 35
|
Posted: Sat Feb 07, 2009 6:21 am Post subject: |
|
|
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
|
|
| Back to top |
|
 |
pbroyce
Joined: 04 Apr 2007 Posts: 5
|
Posted: Wed Feb 24, 2010 1:21 pm Post subject: |
|
|
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.
| Description: |
| tinydns & dnscache template. |
|
 Download |
| Filename: |
cacti-djbdns.tar.gz |
| Filesize: |
7.34 KB |
| Downloaded: |
8 Time(s) |
|
|
| Back to top |
|
 |
|