1 | APRICOT 2010 |
---|
2 | Network Management and Monitoring Workshop |
---|
3 | |
---|
4 | Smokeping Exercises |
---|
5 | ------------------- |
---|
6 | |
---|
7 | 1. Install Smokeping |
---|
8 | -------------------- |
---|
9 | |
---|
10 | # apt-get install smokeping |
---|
11 | |
---|
12 | 2. Initial Configuration |
---|
13 | ------------------------ |
---|
14 | |
---|
15 | # cd /etc/smokeping |
---|
16 | |
---|
17 | - No changes are necessary in this page. You can update the Smokeping |
---|
18 | look and feel by editing /etc/smokeping/basepage.html |
---|
19 | |
---|
20 | # cd /etc/smokeping/config.d |
---|
21 | # ls -l |
---|
22 | |
---|
23 | -rwxr-xr-x 1 root root 578 2010-02-26 01:55 Alerts |
---|
24 | -rwxr-xr-x 1 root root 237 2010-02-26 01:55 Database |
---|
25 | -rwxr-xr-x 1 root root 413 2010-02-26 05:40 General |
---|
26 | -rwxr-xr-x 1 root root 271 2010-02-26 01:55 pathnames |
---|
27 | -rwxr-xr-x 1 root root 859 2010-02-26 01:55 Presentation |
---|
28 | -rwxr-xr-x 1 root root 116 2010-02-26 01:55 Probes |
---|
29 | -rwxr-xr-x 1 root root 155 2010-02-26 01:55 Slaves |
---|
30 | -rwxr-xr-x 1 root root 8990 2010-02-26 06:30 Targets |
---|
31 | |
---|
32 | - The files you need to touch (at a minimum) are: |
---|
33 | |
---|
34 | * Alerts |
---|
35 | * General |
---|
36 | * Probes |
---|
37 | * Targets |
---|
38 | |
---|
39 | - Edit Alerts |
---|
40 | |
---|
41 | # vi Alerts |
---|
42 | |
---|
43 | - Update the top of the file where it says: |
---|
44 | |
---|
45 | *** Alerts *** |
---|
46 | to = alertee@address.somewhere |
---|
47 | from = smokealert@company.xy |
---|
48 | |
---|
49 | to include a proper "to" and "from" field for your server. |
---|
50 | Something like: |
---|
51 | |
---|
52 | *** Alerts *** |
---|
53 | to = root@localhost |
---|
54 | from = smokeping@pcX.mgmt.conference.apricot.net |
---|
55 | |
---|
56 | - If you were going to create tickets from Smokeping alerts |
---|
57 | the "to" address would be an alias for the ticketing system. |
---|
58 | |
---|
59 | - Now save the file and exit, then edit the file General: |
---|
60 | |
---|
61 | # vi General |
---|
62 | |
---|
63 | Change the following lines: |
---|
64 | |
---|
65 | owner |
---|
66 | contact |
---|
67 | cgiurl |
---|
68 | mailhost |
---|
69 | |
---|
70 | Something like this should work: |
---|
71 | |
---|
72 | owner = Admin |
---|
73 | contact = root@pcX.mgmt.conference.apricot.net |
---|
74 | cgiurl = http://noc/cgi-bin/smokeping.cgi |
---|
75 | mailhost = localhost |
---|
76 | |
---|
77 | - Now save the file and exit, then edit the file Probes: |
---|
78 | |
---|
79 | # vi Probes |
---|
80 | |
---|
81 | The current entry in Probes is fine, but if you wish to |
---|
82 | use addtional Smokeping checks you can add them in here |
---|
83 | and you can specify their default behavior. You can do |
---|
84 | this, as well, in the Targets file if you wish. |
---|
85 | |
---|
86 | - Here is an example of a Probes file that would specify |
---|
87 | what to use to check for HTTP and DNS latency as well as |
---|
88 | the FPing probe that is used for ping latency: |
---|
89 | |
---|
90 | *** Probes *** |
---|
91 | |
---|
92 | + FPing |
---|
93 | |
---|
94 | binary = /usr/bin/fping |
---|
95 | |
---|
96 | + EchoPingHttp |
---|
97 | |
---|
98 | + DNS |
---|
99 | binary = /usr/bin/dig |
---|
100 | pings = 5 |
---|
101 | step = 180 |
---|
102 | |
---|
103 | - Go ahead and update your Probes file with this information. |
---|
104 | Then save the file and exit. And, now let's restart the |
---|
105 | Smokeping service to verify that no mistakes have been made |
---|
106 | before going any further: |
---|
107 | |
---|
108 | # /etc/init.d/smokeping stop |
---|
109 | # /etc/init.d/smokeping start |
---|
110 | |
---|
111 | You could, also do: |
---|
112 | |
---|
113 | # /etc/init.d/restart |
---|
114 | |
---|
115 | or |
---|
116 | |
---|
117 | # /etc/init.d/reload |
---|
118 | |
---|
119 | to reload configuration changes. This should work in most |
---|
120 | cases. |
---|
121 | |
---|
122 | 3. Configure monitoring of devices |
---|
123 | ---------------------------------- |
---|
124 | |
---|
125 | - The majority of your time and work configuring Smokeping |
---|
126 | will be done in the file /etc/smokeping/config.d/Targets. |
---|
127 | |
---|
128 | - For this class please do the following: |
---|
129 | |
---|
130 | * Use the FPing probe to check: |
---|
131 | - pc1-pc15 |
---|
132 | - noc |
---|
133 | - Switches: bb-sw, pc1-5-sw, pc6-10-sw, pc11-15-sw |
---|
134 | - Routers: bb-gw, pc1-5-gw, pc6-10-gw, pc11-15-gw |
---|
135 | |
---|
136 | * Create some hierarchy to the Smokeping menu for your |
---|
137 | checks. Such as: |
---|
138 | |
---|
139 | PCs |
---|
140 | Routers |
---|
141 | Switches |
---|
142 | |
---|
143 | * Add a check for HTTP latency for all the classroom PCs. |
---|
144 | This will mean adding another category, such as: |
---|
145 | |
---|
146 | PCs HTTP |
---|
147 | |
---|
148 | * If you have time consider checking some machines that are |
---|
149 | external to our classroom and the conference. |
---|
150 | |
---|
151 | * Look at additional Smokeping probes and consider implementing |
---|
152 | some of them: |
---|
153 | |
---|
154 | http://oss.oetiker.ch/smokeping/probe/index.en.html |
---|
155 | |
---|
156 | - As trying to explain all syntactical details of how the file |
---|
157 | /etc/smokeping/config.d/Targets is used would require several |
---|
158 | pages we will go through some examples in class, and you can |
---|
159 | refer to the Smokeping configuration files that are in use on |
---|
160 | the classroom NOC box by going to: |
---|
161 | |
---|
162 | http://noc/config/etc/smokeping |
---|
163 | http://noc/config/etc/smokeping/config.d |
---|
164 | |
---|