Tools to generate a Cacti template from a MIB

cactimibmonitoringsnmp

We use Cacti to monitor trends on our servers.

Sometimes I get a new appliance or a server, and that appliance comes with a MIB which can be used to monitor the appliance via SNMP. For this example, I have Google Mini Search Appliance, and Google provides a couple of MIBs which can be queried via SNMP. However, this question often comes up for many new appliances and new servers.

If I want to monitor this Google Mini via Cacti, I need to create a Cacti template, which is a non-trivial task. Let's pretend that the Google Search Appliance Statistics template doesn't already exist.

Are there any tools which will auto-generate a Cacti Template from an existing MIB? Or are there any tools which can help me to generate a Cacti Template from an existing MIB?

Best Answer

What you need is usually called a MIB Compiler within the SNMP industry. However, they're not really compilers; they're translators. I don't believe there is a Cacti MIB compiler, but it wouldn't be too hard to create a translator of your own.

A useful tool that I highly recommend, is the libsmi suite which contains a program called smidump. smidump outputs in various formats. You'll probably want to run something like smidump -f identifiers <mibfile> which will dump a sanitized MIB into something more human readable. From the looks of this page, your Cacti syntax is XML. So, I don't think it would take too much to take the smidump, run it through a Perl script to produce your desired Cacti XML. You can then edit through the XML file and produce more human-readable descriptions if needed. Explore the smidump -f to see if there is a format closer to your needs. I see an XML format that might work.

Related Topic