Agenda: observium-lab-1.htm

File observium-lab-1.htm, 19.7 KB (added by admin, 5 years ago)
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
2<html xmlns="">
4  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5  <meta http-equiv="Content-Style-Type" content="text/css" />
6  <meta name="generator" content="pandoc" />
7  <title>Observium - Lab</title>
8  <style type="text/css">code{white-space: pre;}</style>
9  <link rel="stylesheet" href="../../style.css" type="text/css" />
12<div id="header">
13<h1 class="title">Observium - Lab</h1>
15<div id="TOC">
17<li><a href="#introduction"><span class="toc-section-number">1</span> Introduction</a><ul>
18<li><a href="#goals"><span class="toc-section-number">1.1</span> Goals</a></li>
19<li><a href="#notes"><span class="toc-section-number">1.2</span> Notes</a></li>
21<li><a href="#observium-lab"><span class="toc-section-number">2</span> Observium lab</a></li>
22<li><a href="#access-observium"><span class="toc-section-number">3</span> 1. Access Observium!</a></li>
23<li><a href="#edit-the-configuration-file-for-observium-to-tell-it-about-our-network"><span class="toc-section-number">4</span> 2. Edit the configuration file for Observium, to tell it about our network</a></li>
24<li><a href="#add-a-host---your-own-router"><span class="toc-section-number">5</span> 3. Add a host - your own router</a></li>
25<li><a href="#tell-observium-to-run-a-discovery-scan-of-the-network-and-start-collecting-data"><span class="toc-section-number">6</span> 4. Tell Observium to run a discovery (scan) of the network, and start collecting data</a></li>
26<li><a href="#go-back-to-the-web-interface"><span class="toc-section-number">7</span> 5. Go back to the web interface</a></li>
27<li><a href="#enable-cron-jobs"><span class="toc-section-number">8</span> 6. Enable cron jobs</a></li>
28<li><a href="#while-we-wait-for-the-traffic-to-appear-we-can-navigate-the-interface"><span class="toc-section-number">9</span> 7. While we wait for the traffic to appear, we can navigate the interface</a><ul>
29<li><a href="#graphs"><span class="toc-section-number">9.1</span> Graphs</a></li>
30<li><a href="#health"><span class="toc-section-number">9.2</span> Health</a></li>
31<li><a href="#ports"><span class="toc-section-number">9.3</span> Ports</a></li>
32<li><a href="#routing"><span class="toc-section-number">9.4</span> Routing</a></li>
33<li><a href="#inventory"><span class="toc-section-number">9.5</span> Inventory</a></li>
34<li><a href="#logs"><span class="toc-section-number">9.6</span> Logs</a></li>
35<li><a href="#alerts"><span class="toc-section-number">9.7</span> Alerts</a></li>
36<li><a href="#topology-map"><span class="toc-section-number">9.8</span> Topology Map</a></li>
38<li><a href="#add-a-location-and-contact-for-your-router"><span class="toc-section-number">10</span> 8. Add a location and contact for your router</a></li>
39<li><a href="#adding-an-interface-description"><span class="toc-section-number">11</span> 9. Adding an interface description</a></li>
40<li><a href="#ip-address-lookup"><span class="toc-section-number">12</span> 10. IP address lookup</a></li>
41<li><a href="#add-the-switch"><span class="toc-section-number">13</span> 11. Add the switch</a></li>
42<li><a href="#lets-disable-ports-that-are-unused"><span class="toc-section-number">14</span> 12. Let's disable ports that are unused!</a></li>
43<li><a href="#have-you-tried-adding-your-pc-yet-other-pcs-in-the-class"><span class="toc-section-number">15</span> 15. Have you tried adding your PC yet? Other PCs in the class?</a></li>
44<li><a href="#region-settings-for-the-map"><span class="toc-section-number">16</span> 16. Region settings for the map</a></li>
47<h1 id="introduction"><a href="#introduction"><span class="header-section-number">1</span> Introduction</a></h1>
48<h2 id="goals"><a href="#goals"><span class="header-section-number">1.1</span> Goals</a></h2>
50<li>Gain experience with Observium</li>
52<h2 id="notes"><a href="#notes"><span class="header-section-number">1.2</span> Notes</a></h2>
54<li>Commands preceded with &quot;$&quot; imply that you should execute the command as a general user - not as root.</li>
55<li>Commands preceded with &quot;#&quot; imply that you should be working as root.</li>
56<li>Commands with more specific command lines (e.g. &quot;rtrX&gt;&quot; or &quot;mysql&gt;&quot;) imply that you are executing commands on remote equipment, or within another program.</li>
58<h1 id="observium-lab"><a href="#observium-lab"><span class="header-section-number">2</span> Observium lab</a></h1>
59<p>All components for Observium should already be installed - it will be now up to you to configure the service, add hosts, etc...</p>
60<p>If this is not the case, a different lab (observium-install.txt) is available. Follow the instructions in this lab to complete the initial Observium installation.</p>
61<p>Connect to your virtual machine as the sysadm user, then:</p>
62<h1 id="access-observium"><a href="#access-observium"><span class="header-section-number">3</span> 1. Access Observium!</a></h1>
63<p>A user has already been created for you. This is the user 'admin', and the password is the standard class password:</p>
65<pre><code>    User:      admin
66    Password:  the class password</code></pre>
67<p>You should now be logged in to Observium. There should not be any devices configured. Take a look at the interface for a few minutes.</p>
68<h1 id="edit-the-configuration-file-for-observium-to-tell-it-about-our-network"><a href="#edit-the-configuration-file-for-observium-to-tell-it-about-our-network"><span class="header-section-number">4</span> 2. Edit the configuration file for Observium, to tell it about our network</a></h1>
69<pre><code>$ sudo editor /opt/observium/config.php</code></pre>
70<p>Now make the following changes:</p>
71<p>Find the line:</p>
72<pre><code>$config[&#39;snmp&#39;][&#39;community&#39;] = array(&quot;public&quot;);</code></pre>
73<p>... and change 'public' to 'NetManage' (NOT &quot;netmanage&quot; or &quot;NETMANAGE&quot;), so it looks like this:</p>
74<pre><code>$config[&#39;snmp&#39;][&#39;community&#39;] = array(&quot;NetManage&quot;);</code></pre>
75<p>Also, add the following line below:</p>
76<pre><code>$config[&#39;autodiscovery&#39;][&#39;xdp&#39;]            = TRUE;</code></pre>
77<p>Save the file and exit.</p>
78<h1 id="add-a-host---your-own-router"><a href="#add-a-host---your-own-router"><span class="header-section-number">5</span> 3. Add a host - your own router</a></h1>
79<p>In the web interface (, navigate to the Device menu, and click on &quot;Add Device&quot;</p>
80<p>Hostname: SNMP Version: v2c [should already be selected] SNMP Community: you can leave this blank, since we have configured it in the config.php, or you can type it in: NetManage</p>
81<p>If all goes well, you should see several messages like these:</p>
82<pre><code>Adding host community NetManage port 161
84Trying v2c community NetManage ...
86Device added (id = 1)</code></pre>
87<p>You can navigate to the <code>devices</code> view on Observium, and see that the device has indeed been added:</p>
89<p>... you can explore the web interface for a few minutes - but there is no data yet, and if you click on the device (rtrX), Observium will complain that the device hasn't been discovered yet.</p>
90<p>We can tell Observium to start collecting data for this host, by running the following command:</p>
91<pre><code>$ cd /opt/observium
92$ sudo ./poller.php -h all</code></pre>
93<p>... Of course, we don't want to do this manually! We will automate this in the next steps.</p>
94<h1 id="tell-observium-to-run-a-discovery-scan-of-the-network-and-start-collecting-data"><a href="#tell-observium-to-run-a-discovery-scan-of-the-network-and-start-collecting-data"><span class="header-section-number">6</span> 4. Tell Observium to run a discovery (scan) of the network, and start collecting data</a></h1>
95<pre><code>$ cd /opt/observium
96$ sudo ./discovery.php -h all</code></pre>
97<p>Note that a LOT of information will appear!</p>
98<p>We'll run a data collection again manually:</p>
99<pre><code>$ sudo ./poller.php -h all</code></pre>
100<h1 id="go-back-to-the-web-interface"><a href="#go-back-to-the-web-interface"><span class="header-section-number">7</span> 5. Go back to the web interface</a></h1>
102<p>What do you notice ? How do you think Observium found that there were other devices on the network, and how did it know how to contact them ?</p>
103<h1 id="enable-cron-jobs"><a href="#enable-cron-jobs"><span class="header-section-number">8</span> 6. Enable cron jobs</a></h1>
104<p>It's time to make the data collection happen automatically.</p>
105<p>A number of automated maintenance tasks need to be added:</p>
106<p>Create the file /etc/cron.d/observium:</p>
107<pre><code>$ sudo editor /etc/cron.d/observium</code></pre>
108<p>... and paste the following lines:</p>
109<pre><code>33  */6   * * *   root    /opt/observium/discovery.php -h all &gt;&gt; /dev/null 2&gt;&amp;1
110*/5 *     * * *   root    /opt/observium/discovery.php -h new &gt;&gt; /dev/null 2&gt;&amp;1
111*/5 *     * * *   root    /opt/observium/ 1 &gt;&gt; /dev/null 2&gt;&amp;1</code></pre>
112<p>It will take a little while for data to appear in the graphs.</p>
113<h1 id="while-we-wait-for-the-traffic-to-appear-we-can-navigate-the-interface"><a href="#while-we-wait-for-the-traffic-to-appear-we-can-navigate-the-interface"><span class="header-section-number">9</span> 7. While we wait for the traffic to appear, we can navigate the interface</a></h1>
114<p>Go to</p>
115<p>Click on &quot;Devices&quot; in menu at the top. Find the router for your group in the list, and click on its name.</p>
116<p>You will land on the Overview page for your device.</p>
117<p>You will notice that Observium has automatically detected many, many things about your router!</p>
118<p>At the top, under your router's hostname, you will see a list of tabs, all of them presenting information about your device:</p>
119<pre><code>Overview | Graphs | Health | Ports | Routing | Inventory | Logs | Alerts</code></pre>
120<h2 id="graphs"><a href="#graphs"><span class="header-section-number">9.1</span> Graphs</a></h2>
121<p>Under &quot;Graphs&quot;, you will see all information which can be presented in the form of a graph: Network IO, Disk IO, Memory and CPU usage, etc...</p>
122<h2 id="health"><a href="#health"><span class="header-section-number">9.2</span> Health</a></h2>
123<p>You will also see the &quot;Health&quot; tab, which offers various metrics on how the device is doing hardware wise - if this information is available - such as temperature, voltage, fan speed, etc... Notice that some of this information is already shown in the overview page for the device (which you get when you click on the name of the device).</p>
124<h2 id="ports"><a href="#ports"><span class="header-section-number">9.3</span> Ports</a></h2>
125<p>Next we'll take a look at the Ports menu tab. Under &quot;Ports&quot; you will find a summary of traffic for all ports, including bits per second and packets per second, port speed, and the type of connection (Ethernet or other).</p>
126<p>Note that all elements can be clicked on, including the small graphs, and you will be taken to the corresponding page for the data source.</p>
127<h2 id="routing"><a href="#routing"><span class="header-section-number">9.4</span> Routing</a></h2>
128<p>The Routing tab will present you with an overview of enabled routing protocols. If you have enabled OSPF or BGP on your routers, you will get information about the active sessions, neighbors or peers, and other protocol specific information.</p>
129<h2 id="inventory"><a href="#inventory"><span class="header-section-number">9.5</span> Inventory</a></h2>
130<p>Inventory contains a full list of hardware modules and serial numbers for equipment installed on your router. Note that this will not work on all vendors.</p>
131<h2 id="logs"><a href="#logs"><span class="header-section-number">9.6</span> Logs</a></h2>
132<p>Under Logs you will see a list of events for your router: changes that have taken place in the configuration of the device, or in the state of interfaces, services, etc...</p>
133<h2 id="alerts"><a href="#alerts"><span class="header-section-number">9.7</span> Alerts</a></h2>
134<p>Alerts is currently empty for your router - we will see more about this later.</p>
135<h2 id="topology-map"><a href="#topology-map"><span class="header-section-number">9.8</span> Topology Map</a></h2>
136<p>Also, check out the &quot;Map&quot; function, available under &quot;Ports&quot;.</p>
137<p>The Map function is an automatically generated diagram of the topology of your network, as seen from the point of view of your router. This will only function for CDP/LLDP enabled devices (Cisco, IOS, ...)</p>
138<p>You can enable CDP/LLDP on your Linux devices by installing 'ladvd' (sudo apt-get install ladvd). Try adding your Linux devices this way.</p>
139<p>It will only be available if you have enabled 'autodiscovery' 'xdp' as detailed in step 4.</p>
140<h1 id="add-a-location-and-contact-for-your-router"><a href="#add-a-location-and-contact-for-your-router"><span class="header-section-number">10</span> 8. Add a location and contact for your router</a></h1>
141<p>If you navigate back to the Overview page for your router (Go to Devices, click on your router's name), you will see that Observium has picked up the Hardware platform, the Operating System and the Uptime for your device.</p>
142<p>Now, log into your router with SSH and add the following information to your SNMP configuration:</p>
143<p>Set the location (make it a City, Country format, so that your host will appear on the geo map overview page)</p>
144<p>Set the contact (email address or name)</p>
145<p>To do this:</p>
146<pre><code>rtr8&gt; enable
148rtr8# conf terminal
149Enter configuration commands, one per line.  End with CNTL/Z.
150rtr8(config)# snmp-server contact user@email.address
151rtr8(config)# snmp-server location City, Country
152rtr8(config)# exit
153rtr8# write memory</code></pre>
154<p>You want to replace &quot;City, Country&quot; with the city and country (or state) we are currently in. For example:</p>
155<pre><code>Bloomington, Indiana
156Thimphu, Bhutan</code></pre>
158<p>If you wait a few minutes (maximum 5), you should see this information appear automatically on the Overview tab for your router in Observium.</p>
159<p>For fun, talk to your colleagues in the classroom, and ask them to pick a different City and Country for each of the routers! Then wait until Observium has re-scanned the devices, and look at the World map view on the main Observium page (</p>
160<h1 id="adding-an-interface-description"><a href="#adding-an-interface-description"><span class="header-section-number">11</span> 9. Adding an interface description</a></h1>
161<p>While you are still logged in to your router, add a pseudo interface to your router, to see if Observium will pick it up:</p>
162<pre><code>rtr8(config)# interface loopback123                   
163rtr8(config-if)# description A useless interface
164rtr8(config-if)# exit
165rtr8(config)# exit
166rtr8# write memory</code></pre>
167<p>This should also show up in Observium after a while - try and find the description under &quot;Ports&quot;</p>
168<h1 id="ip-address-lookup"><a href="#ip-address-lookup"><span class="header-section-number">12</span> 10. IP address lookup</a></h1>
169<p>From Observium's main page, you will find, under the Overview menu at the TOP of the page), a submenu &quot;Search&quot; with 5 options:</p>
171<li>IPv4 search -&gt;</li>
172<li>IPv6 search -&gt;</li>
173<li>MAC search -&gt;</li>
174<li>ARP/NDP tables -&gt;</li>
175<li>FDB tables -&gt;</li>
177<p>Using the IPv4 and ARP table searches, try and search IPs of equipment in the class:</p>
179<li>IP of the GW (</li>
180<li>IPs of the routers (10.10.X.254)</li>
181<li>IPs of the PCs (,, etc...)</li>
183<p>Try and search IPs for your OWN laptop! Find the IP of you own laptop, and see if you can search it in Observium. Can you ? Why ?</p>
184<h1 id="add-the-switch"><a href="#add-the-switch"><span class="header-section-number">13</span> 11. Add the switch</a></h1>
185<p>From the TOP menu &quot;Devices&quot;, choose &quot;Add device&quot;. Fill out the fields:</p>
187Community: NetManage</code></pre>
188<p>Click on &quot;Add Host&quot;. After a few seconds, it should have added the switch. After a few minutes, data should appear in Observium for the switch.</p>
189<p>Notice the &quot;Ports&quot; line at the TOP right of the Observium interface.</p>
190<p>Does it say that ports are down ? Which ones ?</p>
191<p>Try and click on the 'X down' ports message to see which ports are down on which devices.</p>
192<h1 id="lets-disable-ports-that-are-unused"><a href="#lets-disable-ports-that-are-unused"><span class="header-section-number">14</span> 12. Let's disable ports that are unused!</a></h1>
193<p>Find the Overview page for &quot;;.</p>
194<p>From there, you can configure the device (the &quot;key&quot; icon on the top right). You are then presented with a configuration page for the device.</p>
195<p>Click on Ports, then you will get an overview of the Port status on the switch. Look at the ones that are &quot;down&quot;.</p>
196<p>For those that are &quot;down&quot;, check the &quot;Ignore&quot; box, then &quot;Save&quot; under &quot;Index&quot;.</p>
197<p>If you call back the main Observium page:</p>
199<p>... Observium should no longer complain about these ports!</p>
200<h1 id="have-you-tried-adding-your-pc-yet-other-pcs-in-the-class"><a href="#have-you-tried-adding-your-pc-yet-other-pcs-in-the-class"><span class="header-section-number">15</span> 15. Have you tried adding your PC yet? Other PCs in the class?</a></h1>
201<p>More fun things:</p>
203<li><p>From the top menu, choose Devices -&gt; All devices</p></li>
204<li><p>Find your router, and click on it on the list.</p></li>
205<li><p>Below the graph summary, you'll see a list of the interfaces on your router:</p></li>
207<pre><code>    Fa0/0, Fa0/1, Null0</code></pre>
209<li><p>Click on Fa0/0</p></li>
210<li><p>Click on &quot;Real Time&quot;</p></li>
212<h1 id="region-settings-for-the-map"><a href="#region-settings-for-the-map"><span class="header-section-number">16</span> 16. Region settings for the map</a></h1>
213<p>Optionally, you can change the part of the world the map will show when you log into observium.</p>
214<p>Look at the parameters for this listed at</p>
216<p>In particular, $config['frontpage']['map']['region'] can be set to a particular country or region. There is more information at</p>
217<p>In reference to the configuration settings in step 4.</p>
218<p>The parameter $config['frontpage']['map']['region'] can take multiple values. From:</p>
220<pre><code>region: The area to display on the map. (Surrounding areas will be displayed
221        as well.) Can be one of the following:
223    * &#39;world&#39; - A map of the entire world.
224    * A continent or a sub-continent, specified by its 3-digit
225      code, e.g., &#39;011&#39; for Western Africa.
226    * A country, specified by its ISO 3166-1 alpha-2 code, e.g.,
227      &#39;AU&#39; for Australia.
228    * A state in the United States, specified by its ISO 3166-2:US
229      code, e.g., &#39;US-AL&#39; for Alabama. Note that the resolution
230      option must be set to either &#39;provinces&#39; or &#39;metros&#39;.</code></pre>
231<p>You can test these options by changing the parameter and reloading the overview page of Observium.</p>