APRICOT 2010 Network Management and Monitoring Workshop Smokeping Exercises ------------------- 1. Install Smokeping -------------------- # apt-get install smokeping 2. Initial Configuration ------------------------ # cd /etc/smokeping - No changes are necessary in this page. You can update the Smokeping look and feel by editing /etc/smokeping/basepage.html # cd /etc/smokeping/config.d # ls -l -rwxr-xr-x 1 root root 578 2010-02-26 01:55 Alerts -rwxr-xr-x 1 root root 237 2010-02-26 01:55 Database -rwxr-xr-x 1 root root 413 2010-02-26 05:40 General -rwxr-xr-x 1 root root 271 2010-02-26 01:55 pathnames -rwxr-xr-x 1 root root 859 2010-02-26 01:55 Presentation -rwxr-xr-x 1 root root 116 2010-02-26 01:55 Probes -rwxr-xr-x 1 root root 155 2010-02-26 01:55 Slaves -rwxr-xr-x 1 root root 8990 2010-02-26 06:30 Targets - The files you need to touch (at a minimum) are: * Alerts * General * Probes * Targets - Edit Alerts # vi Alerts - Update the top of the file where it says: *** Alerts *** to = alertee@address.somewhere from = smokealert@company.xy to include a proper "to" and "from" field for your server. Something like: *** Alerts *** to = root@localhost from = smokeping@pcX.mgmt.conference.apricot.net - If you were going to create tickets from Smokeping alerts the "to" address would be an alias for the ticketing system. - Now save the file and exit, then edit the file General: # vi General Change the following lines: owner contact cgiurl mailhost Something like this should work: owner = Admin contact = root@pcX.mgmt.conference.apricot.net cgiurl = http://noc/cgi-bin/smokeping.cgi mailhost = localhost - Now save the file and exit, then edit the file Probes: # vi Probes The current entry in Probes is fine, but if you wish to use addtional Smokeping checks you can add them in here and you can specify their default behavior. You can do this, as well, in the Targets file if you wish. - Here is an example of a Probes file that would specify what to use to check for HTTP and DNS latency as well as the FPing probe that is used for ping latency: *** Probes *** + FPing binary = /usr/bin/fping + EchoPingHttp + DNS binary = /usr/bin/dig pings = 5 step = 180 - Go ahead and update your Probes file with this information. Then save the file and exit. And, now let's restart the Smokeping service to verify that no mistakes have been made before going any further: # /etc/init.d/smokeping stop # /etc/init.d/smokeping start You could, also do: # /etc/init.d/restart or # /etc/init.d/reload to reload configuration changes. This should work in most cases. 3. 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 FPing probe to check: - pc1-pc15 - noc - Switches: bb-sw, pc1-5-sw, pc6-10-sw, pc11-15-sw - Routers: bb-gw, pc1-5-gw, pc6-10-gw, pc11-15-gw * Create some hierarchy to the Smokeping menu for your checks. Such as: PCs Routers Switches * Add a check for HTTP latency for all the classroom PCs. This will mean adding another category, such as: PCs HTTP * If you have time consider checking some machines that are external to our classroom and the conference. * Look at additional Smokeping probes and consider implementing some of them: http://oss.oetiker.ch/smokeping/probe/index.en.html - As trying to explain all syntactical details of how the file /etc/smokeping/config.d/Targets is used would require several pages we will go through some examples in class, and you can refer to the Smokeping configuration files that are in use on the classroom NOC box by going to: http://noc/config/etc/smokeping http://noc/config/etc/smokeping/config.d