Rob Golding

Technology Consultant
  • Home
  • About Me
  • Curriculum Vitae
  • Contact

Cacti and Network Weathermap

April 14, 2008

While improving the network at my house (an indeed, the network which supports this very web server), I started to explore the world of network monitoring and reporting. I had heard quite a bit about Cacti before, but never considered installing it. That was mostly due to the stories I had heard about how unholy difficult the damn thing is to get working properly. “Don’t even go there” was my mindset. Until now, that is.

Cacti is a complete network graphing solution designed to harness the power of RRDTool’s data storage and graphing functionality.

Brilliant. Network graphing is good, I want to see pretty charts and graphs about how my network is doing. So I gave it a go. Here’s some of my ups-and-downs, and the end result.

First, I needed a linux machine to try this on. Cacti itself obviously wasn’t enough of a challenge for me, I wanted to get it to work on an operating system with which I had very little experience. I chose Ubuntu Server 7.10 – I’ve worked with Ubuntu before, and I like the Aptitude package manager which would make this project somewhat easier for me.

So first of all, I installed the O/S. I’m using a Virtual Machine on my main VM host, which had some RAM to spare. I only have the machine 128MB, as I’m not going to be asking too much of it (hopefully). I didn’t specify a LAMP install, even though that is exactly what would be required. I wanted to do all the fiddly stuff later on.

Once the O/S was on, I needed to install the required packages, and then Cacti itself. Cacti requires a web server, with PHP and GD (the image library), and a MySQL server. I followed this guide to get them all installed on this new machine, and then extracted and set up Cacti.

Worth noting here, is that when importing the cacti.sql file into the MySQL database, I first created the database called “cacti”, then modified the cacti.sql file, adding “use cacti” to the beginning of the file – otherwise an error stating “no database selected” would appear.

Once the database was setup, and Cacti was extracted – I pointed Firefox to http://cacti/cacti (I had a creative moment and called the Cacti server cacti). The setup process was web-based from here-on, and Cacti was installed in a matter of seconds.

So, now I added my hosts (after enabling the SNMP service on my Windows Servers, and configuring the community), and created some graphs. Just network traffic graphs at first. After a few polls, I was amazed to see the graphs populating perfectly. After following these instructions I made them look so much better (maybe not sexy, though!), and the result was something like this:

Wonderful. Pretty graphs showing me how much the internet connection is being used. 100k eh? Somehow I think paying for 20Mb isn’t worth it!

OK, so now I have lots of nice graphs, I wanted to get a Network Weathermap working – which is like a virtual network diagram, showing the traffic between each node on the map – as it reads the data from the same source as Cacti.

This was much easier than I thought – after adding the nodes and links into the config file, the values took on the colours of my scale as they should – and I had a lovely diagram of my network with automatically updating traffic information! Here’s the end result.

And there we have it! Not at all as bad as I was expecting. I do hope this will be of help to anyone wanting to do something similar.

Share and Enjoy:
  • Digg
  • del.icio.us
  • Slashdot
  • StumbleUpon
  • Technorati
Categories
Home Network, Linux, Technology
Comments rss
Comments rss
Trackback
Trackback

« Restoring the Separate _msdcs Zone Using Locally-Attached Network Printers with Terminal Services »

5 Responses to “Cacti and Network Weathermap”

  1. slebourdon says:
    May 14, 2008 at 4:03 pm

    How do you manage to retrieve datas from Ipcop, SNMP is not installed and is pretty insecure for a firewall appliance ?

    Are you using ipacsum datas generated by Ipcop ?

    I\\\’m looking different ways to get it works but seems to be difficult.

    Thanks.

  2. admin says:
    May 20, 2008 at 5:36 pm

    I am using SNMP on my switch, the FSM726. I did spend quite a lot of time trying to get the RRD files from IPCop parsed into Cacti, but I couldn’t get it to work – when I had the inspiration to use the switch instead – much simpler :) .

    There’s an updated version of the weathermap published on the right of the blog, showing real-time status, it’s quite interesting.

    I know it is possible to parse the RRD files in Cacti, as IPCop generates its own (for the system/traffic graphs in the web GUI) – try this link:

    http://forums.cacti.net/viewtopic.php?t=12202

    I found it after I started using the switch, so never followed it, but it looks like it’ll do exactly what you want – you just need to setup a script to copy the RRD files from the IPCop box to your cacti server every so often.

    Rob

  3. slebourdon says:
    May 22, 2008 at 7:50 am

    Thanks a lot

    Stéphane

  4. Sid says:
    July 15, 2008 at 4:59 am

    I followed this How To to create a host template for importing IPCop’s System & Traffic graphs. I also created a SCP script utilizing SSH keys to automatically copy over IPCop’s graphs to Cacti.

    A detailed How To is documented here.

    Enjoy!

  5. admin says:
    July 15, 2008 at 4:50 pm

    Wow that looks really helpful, I’ll certainly give it a go. I had tried to import the RRD data from IPCop, but failed so I just used the switch. This will allow me to get CPU/Memory data as well though, which will be good.

Leave a Reply

Click here to cancel reply.

Pages

  • About Me
  • Curriculum Vitae

RSSFollow Me

Rob Golding
  • I've lost my car under all this white stuff...I'm sure it will turn up soon. 10:57:50 AM February 21 from HTC Peep
  • @BenJenkinson I certainly do! Everyone but Simon and River. 07:32:19 PM February 07 from HTC Peepin reply to BenJenkinson
  • Is it sad that my servers are now all named after firefly characters? 12:58:30 PM February 07 from HTC Peep

Recent Posts

  • Mercurial on University of Nottingham Computer Science Servers
  • Custom Section Numbering in LaTeX
  • Linux-Windows Integration (à la Likewise-Open & Winbind)
  • It Begins…
  • Exchange 2007 Autodiscover Issues

Archives

  • March 2010
  • February 2010
  • December 2009
  • September 2009
  • July 2009
  • June 2009
  • April 2009
  • March 2009
  • January 2009
  • November 2008
  • October 2008
  • September 2008
  • July 2008
  • April 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • September 2007

Technorati

Blog Information Profile for robgolding63
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox