Posts Tagged ‘monitoring’

incron – File System Event Monitoring

By Mark Davidson on September 23rd, 2010

I haven’t done a post in a while so thought it was about time I finished off one of my 22 draft posts.

In this post I would like to mention incron. Simply put incron monitors the file system for events and when they occur it can execute commands that are defined in user or system tables in a similar way to cron.

So how is this useful you might ask, well in my case I wanted a way to monitor a directory of uploaded images on one server and when new ones are added copy them across to another server. But you can do absolutely anything you want with it, like monitor a directory for changes and alert by email of them. Read & Comment ›››

SysInfoRM Git Repository

By Mark Davidson on February 11th, 2010

Just a very quick update I have setup a Git Repository for my SysInfoRM project.

It can be found at

Installing & Configuring Cacti Under Gentoo

By Mark Davidson on February 9th, 2010

Cacti is a front end to RRDTool, the purpose of which to provide an effective network graphing solution for monitoring devices within a Network. It can be used with SNMP to monitor various statistics about a device including but not limited to Load Average, Bandwidth, Disk Usage and Processes.

The following are the steps to install Cacti under Gentoo

  1. Modify your /etc/make.conf and modify your use flags adding “mysql xml sockets vhosts”, which should give you a line reading something similar to
    USE="symlink mmx sse sse2 bash-completion vhosts xml sockets snmp"
  2. Now emerge Apache, PHP, Cacti and webapp-config. You may already have some of these installed but it is important to rebuild them with the new use flags.
    sudo emerge apache php cacti webapp-config

    Once completed if everything has installed correctly procede to the next step if you get an error saying “Could not read settings from webapp-config” I found the easiest way to solve this was to unmerege webapp-config and reinstalled it.

  3. Update your /etc/ config files if required
    sudo etc-update
  4. Create a vhost if you don’t already have one and then run the following. Then install cacti to the vhost using webapp-config. Remember to change the -h option to reflect the name of your vhost and that you may need to set a different cacti version number if cacti has been updated since I posted this article.
    sudo webapp-config -I -h -d cacti cacti 0.8.7e-r1
  5. Its now time to setup the database that Cacti will be using.
    mysqladmin -p --user=root create cacti
    mysql -p --user=root cacti < /var/www/ # Remember to change this to reflect the path to your cacti install.
    mysql -p --user=root mysql
    GRANT ALL ON cacti.* TO [email protected] IDENTIFIED BY  'somepassword'; # Just a note I like to use apg to generate my passwords.
    flush privileges;
  6. Now that the database has been created your need to set the database settings in cacti. Modify /var/www/ if your installing with a local database and only changed the password above that’s all you need to update in the config file.
  7. The last step of the install is to add a cron entry to your tab to get Cacti to update. Add the following entry to your crontab updating the path as needed.
    */5 * * * * apache /usr/bin/php  /var/www/ > /dev/null  2>&1
  8. That should be it for Cacti base install visit and you should be meet with a login screen use admin as the username and admin as the password. You should now see the Cacti inteface.
  9. Click on the Graphs tab accross the top and after a while once data starts coming in your should see the graphs start to be drawn. At the moment these graphs will display localhost data.

Thats all for now in the next post I will cover setting up net-snmpd on a host and then configuring Cacti to monitor it.