Version 14 (modified by 3 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
Now open the Alerts file (note the first capital letter)
# cd /etc/smokeping/config.d # vim Alerts
Change the following lines:
to = sysadm@localhost from = smokeping-alert@localhost
Save the file and exit. Restart Smokeping:
# systemctl restart smokeping
Configure monitoring of devices
The majority of your time and work configuring Smokeping will be done in the file /etc/smokeping/config.d/Targets
For this class please do the following:
Use the default FPing probe to check:
- Servers in your campus
- Firewalls
- Switches
- Routers
You can use the your physical Network Devices or the Devices in Network we configured on our last Workshop (Workshop on Tuning up Campus Network) for testing.