Install rrdutil.pl per the instructions at http://www.tnpi.biz/internet/manage/rrdutil/. Use diff to see if there is anything new in rrdutil.conf that you want. That's it.
Add these entries to your snmpd.conf and restart snmpd:
sh WebHits /usr/local/sbin/logmonster "-d -r -q" sh MailDeliv /usr/local/sbin/maillogs "send" sh MailSMTP /usr/local/sbin/maillogs "smtp" sh MailPOP3 /usr/local/sbin/maillogs "pop3" sh MailIMAP /usr/local/sbin/maillogs "imap" sh MailRBL /usr/local/sbin/maillogs "rbl" sh MailWeb /usr/local/sbin/maillogs "webmail" sh MailSpam /usr/local/sbin/maillogs "spamassassin" sh MailQS /usr/local/sbin/maillogs "qmailscanner" sh MysqlType /usr/local/sbin/mysqlstatus.pl "type" sh MysqlQueries /usr/local/sbin/mysqlstatus.pl "queries"
If you don't already have an snmpd.conf installed (/usr/local/share/snmp/snmpd.conf), begin with the example file in the contrib directory of the RRDutil.tar.gz package.
Use Mail::Logs. http://www.tnpi.biz/internet/mail/maillogs/
Mail::Logs acts as a log post processor for multilog and also counts log entries in a syslog style log (ie, /var/log/maillog). Configure your SNMP to run maillogs and it will can spit out numbers suitable for feeding into RRDUtil. :)
Use Logmonster. (http://www.tnpi.biz/internet/www/logmonster/) Logmonster acts as the intermediary between Apache and your log processors. See it's page for more information but it too will maintain counters and spit out numbers suitable for feeding into RRDUtil. :)
It can be a lot of work to massage your system into spitting out all the right data, storing it, and then getting that data to display in a very practical, understandable, and aesthetically pleasing fashion. I offer the script as a freebie. If you need help setting it up you need to hire me.
I can't think of any reason it won't work with any SNMP. However, since I use Net::SNMP, your snmpd must be supported by that Perl module. I have no problems with net-snmp versions 4 and only occasionally have problems with net-snmp 5.
That error is probably generated by the mail clients RRD. The new template has additional DS records to support the smtp-auth and webmail counters. You have two choices: 1) delete the mail_clients.rrd file or 2) ignore the error. RRDutil should continue to work but you won't get the new counters.
Use mysqlstatus.pl. Mysql keeps the counters internally, the status script simply polls them.
Download the RRDutil.tar.gz package, expand it and look in the contrib directory. Get it working on the command line before expecting it to work for RRDutil. It gets mysql authentication information from ~/.my.cnf, just like the mysql client. If mysql works, so will mysqlstatus.pl.
It is installed for you if you type ``make newconf''.
First, install /usr/ports/sysutils/xmbmon. Read the associated README, running /usr/local/bin/mbmon -d to see if you have supported hardware. If so, then have a look at contrib/mbmonstatus.pl. Run it and see if it outputs values you'd expect. If it works, copy it over to /usr/local/sbin/mbmonstatus.pl, and uncomment the appropriate entries in your rrdutil.conf file.
A working example is here: http://bsdfreaks.muntinternet.nl/cgi-bin/rrdutil.cgi
I just set up my copy of rrdutil to monitor network traffic across my switch. I thought I'd document what I did in case others wish to do the same thing.
First, I did a lot of reading about SNMP and various MIBs. Most of this turned out to be unnecessary since there is a standardized layout for SNMP data about network traffic, and most devices can be polled using the same set of OIDs that RRDUtil already uses to monitor the interfaces on NET-SNMP hosts.
Basically, all I needed was to find the names of the interfaces for each port on my switch, which I did as follows:
# snmpwalk -v 2c -c public 192.168.1.254 .1.3.6.1.2.1.2.2.1.2 IF-MIB::ifDescr.1 = STRING: RMON Port 1 on Unit 1 IF-MIB::ifDescr.2 = STRING: RMON Port 2 on Unit 1 IF-MIB::ifDescr.3 = STRING: RMON Port 3 on Unit 1 IF-MIB::ifDescr.4 = STRING: RMON Port 4 on Unit 1 ...
1) ``public'' is the SNMP community string my switch uses
2) 192.168.1.254 is the IP address of my switch
3) That long string of numbers at the end is saying ``give me the names of all the interfaces on the device.''
The ``STRINGs'' returned are the names of the interfaces for each port on the switch-- your switch may name these ports differently than mine. Once I had these, configuring rrdutil was as easy as adding the following to rrdutil.conf:
auth2 = 192.168.1.254, snmp, 2, public monitor21 = 192.168.1.254, net, RMON Port 1 on Unit 1, port1 monitor22 = 192.168.1.254, net, RMON Port 2 on Unit 1, port2 monitor23 = 192.168.1.254, net, RMON Port 3 on Unit 1, port3 monitor24 = 192.168.1.254, net, RMON Port 4 on Unit 1, port4 ...
That's all there is to it... Now there's a graph for each switch port available through rrdutil.cgi
Hope this helps someone out.
David
There's a variety of reasons why SNMP collection might fail. I'll break the diagnosis down into three categories:
SNMP agent
The SNMP agent is a program like ucd-snmp or net-snmp that runs on your server. You should have already installed it (or had it installed for you by Mail::Toaster. If you installed it yourself, make sure to read the FAQ entry for setting up your snmpd.conf. Once configured, you can test to make sure that your SNMP oids are properly configured by polling the SNMP agent manually. I find the easiest way to do this is using snmpwalk: snmpwalk -v 2c -c monitoring localhost .1.3.6.1.4.1.2021.10.1.3.1. The oid to poll can be looked up in the rrdutil.conf file and the results should be the same as if you ran the data collection script manually.
DATA COLLECTION
Data collectors are often little scripts that gather raw data from counters and then format that data for SNMP collection. Examples are mysqlstatus.pl, apastat.pl, mailogs, and logmonster. All those scripts have options to output processed counters for SNMP collection. Running these scripts manually is best method for debugging. When rrdutil.pl is run in update mode (rrdutil.cgi -a update), it also accepts a -v (verbose) flag which will print out a detailed description of the actions it's taking.
DISPLAY
The final category is extracting the data from the rrd files and creating graphs for viewing in a web browswer. Very few problems happen here. Just make sure to set up rrdutil.conf properly, set up your web server so that the image directory is served, and rrdutil extracts the data from the databases, formats it, generates the graphs, and displays them in a web page.
Not yet. I would like RRDutil to poll routers as well. I use cacti for now. If you were to pay the suggested $75 donation for RRDUtil and then ask me when I planned to have that feature completed, you'd likely get a favorable response. :)