Network Monitoring Station

Setting up a Network Monitoring Station

We all have important equipment running on our network, from a corporate database server, network drive share to an office wifi access point. We want them running all the time and thus we need to keep an eye on them. Introducing a network monitoring station.

Network monitoring station is a computer (server) that does all sorts of monitoring work within your network environment. Special characteristics as follow:

  • It is ON and running on your network at all time
  • It needs to able to “see” and “communicate” with the devices that you want it to monitor
  • It surveys your network, checking devices (you specify) with logging and reports findings via email
  • It graphs so you will have a better view of capture over time
  • Admin uses client (browser) to access network monitoring server and view report, real time graphs, etc.

In this blog we document our build. Setting up is easy at first, then progressively getting harder when comes to configure Cacti to monitor your devices, some learning curves involved but most are straight forward.

Lets go.

Preparing Network Monitoring Server

  • Setup VM (1 processor, 512MB memory and 50GB Hard Disk)
  • Install Fedora (We have Fedora 17 running)
  • Make sure Fedora is all patched up (yum update)
  • Disable SELINUX
  • Setup static IP address and assign internal DNS name for this server
  • Runs inside data center among your server equipment
  • If your environment have a centralized database server and you plan to use it, work with DB admin to create new database in advance. Some monitoring packages require database back end support
  • Configure Sendmail so that monitoring software can utilize mail function to email alert or report

Preparing Network Monitoring server with basic software

  • yum install httpd
  • yum install php
  • yum install php-mysql
  • yum install net-snmp-utils

Installing Network Monitoring software (cacti)

  • yum install cacti
Dependencies Resolved

================================================================================
Package            Arch           Version                Repository       Size
================================================================================
Installing:
cacti              noarch         0.8.8a-1.fc17          updates         2.0 M
Installing for dependencies:
libzip             i686           0.10.1-1.fc17          fedora           46 k
mysql              i686           5.5.32-1.fc17          updates         4.7 M
php                i686           5.4.16-1.fc17          updates         2.6 M
php-cli            i686           5.4.16-1.fc17          updates         2.6 M
php-common         i686           5.4.16-1.fc17          updates         847 k
php-mysql          i686           5.4.16-1.fc17          updates         121 k
php-pdo            i686           5.4.16-1.fc17          updates         117 k
php-snmp           i686           5.4.16-1.fc17          updates          50 k

Transaction Summary
================================================================================
Install  1 Package (+8 Dependent packages)

Creating user/database for Cacti operation

  • Create new cacti user
  • Create new cacti database
  • Check security and permission
  • Import /usr/share/doc/cacti-0.8.8a/cacti.sql to new database
  • cactidb

Modify the Cacti configuration files

  • vi /etc/cacti/db.php
  • Then edit and types like below
    $database_default = “cactidb”;
    $database_hostname = “your server name”;
    $database_username = “cacti user name”;
    $database_password = “cacti password”;

Start cron job and collecting data

  • vi /etc/cron.d/cacti
  • Remove the comment on the line for cron to execute poller.php

Modify the HTTP configuration file for Cacti

  • vi /etc/httpd/conf.d/cacti.conf
  • Comment out “Deny from all”
  • Change “Allow from 127.0.0.1? to “Allow from all”
  • This will allow Cacti page to be accessible everywhere within your network

Finishing up Cacti

  • Launch browser and visit the network monitoring server
    http://Servername/cacti
  • Click Next
  • Select “New Install” and click Next
  • Make sure all paths are found (in green) and click Finish
  • You will see the Cacti User Login screen, use default credential to enter
  • User Name = admin, Password = admin

Installing Network Monitoring software (SmokePing)

  • yum install smokeping
  • Edit /etc/httpd/conf.d/smokeping.conf
  • Comment out “Deny from all” and change to “Allow from all”
  • Restart httpd
  • Edit /etc/smokeping/config and start adding your host you want monitored

Setup Monitoring Dashboard workstation

With the Network Monitoring server now setup and running. All admins have to do is to access the server by visiting the server.

  • http://ServerName/cacti
  • http://ServerName/smokeping/sm.cgi

In our shop, we wanted a dedicated wall mount LCD as real time monitoring dashboard. We will use a Raspberry Pi driving a 22″ LCD panel.

  • Setup and get Raspberry Pi working (SD card, Power supply, HDMI cable)
  • Make sure Pi boots to GUI
  • Once GUI loaded, launch browser with two the above URLs

Well, thanks for dropping by. We hope you find this article useful. Stay Tuned.

Team BTF.

Leave a Reply

Your email address will not be published. Required fields are marked *