1.Download tinystats
wget http://morettoni.net/bsd/tinystats-1.1.tar.gz
tar -xfz tinystats-1.1.tar.gz
cd tinystats
2.Fix Makefile
find:
.ifdef WITH_IPV6
IPV6=-DWITH_IPV6
.endif
modified:
ifdef WITH_IPV6
IPV6=-DWITH_IPV6
endif
3.Edit tinystats.c
delete :
fprintf (o, "%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu:%lu\n",
a, ns, cname, soa, ptr, hinfo, mx, txt, rp, sig, key, aaaa, axfr, any,
total, other, na, ni, bc, nq);
fprintf (o, "a:ns:cname:soa:ptr:hinfo:mx:txt:rp:sigaaaa:axfr:any:total:other:notauth:notimpl:badclass:noquery\n");
add:
fprintf (o, "A:%lu NS:%lu CNAME:%lu SOA:%lu PTR:%lu HINFO:%lu MX:%lu TXT:%lu RP:%lu SIG:%lu KEY:%lu AAAA:%lu AXFR:%lu ANY:%lu TOTAL:%lu OTHER:%lu NA:%lu NI:%lu BC:%lu NQ:%lu\n", a, ns, cname, soa, ptr, hinfo, mx, txt, rp, sig, key, aaaa, axfr, any,total, other, na, ni, bc, nq);
4.Compile tinystats
make install strip
5.Edit tinydns log run script (/etc/tinydns/log/run)
#!/bin/sh
exec /usr/local/bin/setuidgid dnslog \
/usr/local/bin/tinystats -h /etc/tinydns/log/main/ /usr/local/bin/multilog s1048576 n2 /etc/tinydns/log/main/
restart log supervise:
svc -t /etc/tinydns/log
6.Edit the snmpd.conf of the tinydns server
add the below line:
exec .1.3.6.1.4.1.2021.13.107 tinydns-stats /bin/cat /etc/tinydns/log/main/tinystats.out
then restart you snmpd daemon:
/etc/init.d/snmpd restart
You can use the snmpget to test:
snmpget -v 2c -Oaqv -c public localhost .1.3.6.1.4.1.2021.13.107.101.1
7.Put tinystats.sh into cacti_install_directory/scripts
#!/bin/bash
/usr/bin/snmpget -v 2c -Oaqv -c public $1 .1.3.6.1.4.1.2021.13.107.101.1|sed 's/"//;s/"$//'
8.Import cacti_data_template_tinydns_stats_data_template.xml and cacti_graph_template_tinydns_statistic_graph_template.xml from cacti web gui.
9.Add your graph.
tinystats offical website: http://morettoni.net/tinystats.en.html
tinydns stats template [ use tinystats ,not djbdns-stats]
Moderators: Developers, Moderators
-
- Posts: 1
- Joined: Wed Jul 30, 2008 2:44 am
tinydns stats template [ use tinystats ,not djbdns-stats]
- Attachments
-
- untitled.JPG (38.54 KiB) Viewed 5607 times
-
- cacti_data_template_tinydns_stats_data_template.xml
- (21.76 KiB) Downloaded 233 times
-
- cacti_graph_template_tinydns_statistic_graph_template.xml
- (50.98 KiB) Downloaded 377 times
scale is off?
Hi, thanks for the templates - I followed the docs and everything is good - except the data returned from snmp seems off by a factor of 10 or 100 - so my graphs end up with a scale between 0 and 2
any ideas?
thanks![/img]
any ideas?
thanks![/img]
Re: tinydns stats template [ use tinystats ,not djbdns-stats
took me a few hrs to figure this out.. but here's what I figured out (I'm no expert but I just know it works)
Originally had TinyDNS installed on a CentOS 5.7 Final with Net SNMP 5.3.2.2 And the above worked.. I've now upgraded my boxes to CentOS 6.3 and the Repo contains Version 5.5 of NET-SNMP
I could not get the scripts to work for nothing undtil I changed
#!/bin/bash
/usr/bin/snmpget -v 2c -Oaqv -c public $1 .1.3.6.1.4.1.2021.13.107.101.1|sed 's/"//;s/"$//'
To
#!/bin/bash
/usr/bin/snmpwalk -v 2c -Oaqv -c public $1 .1.3.6.1.4.1.2021.13.107.4|sed 's/"//;s/"$//'
In the snmpd.conf I also had to use
extend .1.3.6.1.4.1.2021.13.107 tinydns-stats /bin/cat /etc/tinydns/log/main/tinystats.out
just incase anyone else has the same problem and comes along from google like me.. thats how I fixed.. now trying to figure out how to get the stat graph correct
Originally had TinyDNS installed on a CentOS 5.7 Final with Net SNMP 5.3.2.2 And the above worked.. I've now upgraded my boxes to CentOS 6.3 and the Repo contains Version 5.5 of NET-SNMP
I could not get the scripts to work for nothing undtil I changed
#!/bin/bash
/usr/bin/snmpget -v 2c -Oaqv -c public $1 .1.3.6.1.4.1.2021.13.107.101.1|sed 's/"//;s/"$//'
To
#!/bin/bash
/usr/bin/snmpwalk -v 2c -Oaqv -c public $1 .1.3.6.1.4.1.2021.13.107.4|sed 's/"//;s/"$//'
In the snmpd.conf I also had to use
extend .1.3.6.1.4.1.2021.13.107 tinydns-stats /bin/cat /etc/tinydns/log/main/tinystats.out
just incase anyone else has the same problem and comes along from google like me.. thats how I fixed.. now trying to figure out how to get the stat graph correct
Who is online
Users browsing this forum: No registered users and 2 guests