wiki:Nmm2022/Agenda/SmokepingSetup

Version 10 (modified by geethike, 2 years ago) ( diff )

--

Campus Network Design - Network Setup

In this exercise you will install Smokeping and get it to monitor various devices in the class network.

Since most of the tasks in this exercise require you to be "root", the first thing you should do is to connect to your PC and start a root shell.

$ sudo -s
#

Install Smokeping

Before we install Smokeping we have to update our OS and install Apache web server.

# apt update
# apt upgrade
# apt install apache2
# systemctl start apache2
# systemctl enable apache2

Now we will continue with the Smokeping installation.

# apt install smokeping
# chmod u+s /usr/bin/fping
# a2enmod cgi
# systemctl reload apache2

Initial Configuration

Let's make sure that your web server and Smokeping are running:

# systemctl start apache2
# systemctl enable smokeping
# systemctl start smokeping

Then point your web browser at:

http://hostX/smokeping/smokeping.cgi

(replace "hostX" with your own host/IP) to check that it is running.

Files that are associated with Smokeping can accessed as follows;

# cd /etc/smokeping/config.d
# ls -l

-rwxr-xr-x 1 root root  578 2022-02-26 01:55 Alerts
-rwxr-xr-x 1 root root  237 2022-02-26 01:55 Database
-rwxr-xr-x 1 root root  413 2022-02-26 05:40 General
-rwxr-xr-x 1 root root  271 2022-02-26 01:55 pathnames
-rwxr-xr-x 1 root root  859 2022-02-26 01:55 Presentation
-rwxr-xr-x 1 root root  116 2022-02-26 01:55 Probes
-rwxr-xr-x 1 root root  155 2022-02-26 01:55 Slaves
-rwxr-xr-x 1 root root 8990 2022-02-26 06:30 Targets

The files that you'll need to change, at a minimum, are:

  • Alerts
  • General
  • Probes (to be done later)
  • Targets

Now open the General file (note the first capital letter)

# vim General

(you can replace "vim" with "nano" or "vi" if you like)

Change the following lines according to your institute:

owner    = NOC
contact  = sysadm@localhost
mailhost = localhost
cgiurl   = http://localhost/smokeping/smokeping.cgi
# specify this to get syslog logging
syslogfacility = local5

Save the file and exit. Now let's restart the Smokeping service to verify that no mistakes have been made before going any further:

# systemctl restart smokeping
Note: See TracWiki for help on using the wiki.