Installing Cacti & MRTG

MRTG and Cacti are both very similar network monitoring tools. They basically both involve reading SNMP values from SNMP-enabled hosts and displaying them in a very user-friendly graphical manner.

Cacti is easier to use and more scalable than MRTG. But, what first attracted me to MRTG was the check_mrtg nagios plugin. I haven’t yet gotten to the stage of integrating MRTG and cacti, though be sure of a blog post when i do😉

Anyways I installed both system on our Ubuntu server. Both were quite simple. Each requires an apache server with php enabled, as well as the snmpd and snmp packages we also needed for nagios.

There’s a good guide on installing MRTG over here

And there’s an excellent guide on installing Cacti over here

Cacti was simple to setup, but took me a few minutes to get used to adding graphs which poll custom SNMP MIBs (in the previous blog post I described importing vendor specific MIBs into a Nagios monitoring system, I now wanted to graph that value).

These are the steps I had to take:

1. Console > Management > Devices : Add the SNMP enabled device

2. Console > Management > Data Sources > Add

3.  In the “select data template” chose the “SNMP Generic OID template” and chose the correct host

4. In the “Data Source Type“, selected “GAUGE” and as OID entered the OID as retrieved from the MIB browser (see my post here for more details on this)

5. Console > Management > Graph Management

6. Chose the same as in step (3)

7. Filled in the correct details and as “Data Source [snmp_oid]“, selected the data source created in step 3.

That’s it in a nutshell🙂