| 1 | Observium lab |
|---|
| 2 | |
|---|
| 3 | All components for Observium should already be installed - it will be |
|---|
| 4 | now up to you to configure the service, add hosts, etc... |
|---|
| 5 | |
|---|
| 6 | If this is not the case, a different lab (observium-install.txt) is |
|---|
| 7 | available. |
|---|
| 8 | |
|---|
| 9 | 1. You need to set he name of the Observium web site (virtual host) on |
|---|
| 10 | your server: |
|---|
| 11 | |
|---|
| 12 | $ cd /etc/apache2/sites-enabled/ |
|---|
| 13 | $ sudo editor observium |
|---|
| 14 | |
|---|
| 15 | Find the line: |
|---|
| 16 | |
|---|
| 17 | ServerName observiumX.ws.nsrc.org |
|---|
| 18 | |
|---|
| 19 | ... and replace "X" with the number of your PC. |
|---|
| 20 | |
|---|
| 21 | Save the file and exit. |
|---|
| 22 | |
|---|
| 23 | 2. Reconfigure the webserver: |
|---|
| 24 | |
|---|
| 25 | $ sudo apachectl graceful |
|---|
| 26 | |
|---|
| 27 | 3. Access Observium! |
|---|
| 28 | |
|---|
| 29 | A user has already been created for you. This is the user 'admin', and |
|---|
| 30 | the password is the standard class password: |
|---|
| 31 | |
|---|
| 32 | http://observiumX.ws.nsrc.org/ |
|---|
| 33 | |
|---|
| 34 | User: admin |
|---|
| 35 | Password: the class password |
|---|
| 36 | |
|---|
| 37 | You should now be logged in to Observium. There should not be any devices |
|---|
| 38 | configured. Take a look at the interface for a few minutes. |
|---|
| 39 | |
|---|
| 40 | 4. Edit the configuration file for Observium, to tell it about our network: |
|---|
| 41 | |
|---|
| 42 | $ sudo editor /opt/observium/config.php |
|---|
| 43 | |
|---|
| 44 | Now make the following changes: |
|---|
| 45 | |
|---|
| 46 | - Find the line: |
|---|
| 47 | |
|---|
| 48 | $config['snmp']['community'] = array("public"); |
|---|
| 49 | |
|---|
| 50 | ... and change 'public' to 'NetManage' (NOT "netmanage" or "NETMANAGE"), |
|---|
| 51 | so it looks like this: |
|---|
| 52 | |
|---|
| 53 | $config['snmp']['community'] = array("NetManage"); |
|---|
| 54 | |
|---|
| 55 | - Now find the two lines (near the end): |
|---|
| 56 | |
|---|
| 57 | $config['nets'][] = "172.22.0.0/16"; |
|---|
| 58 | $config['nets'][] = "192.168.0.0/24"; |
|---|
| 59 | |
|---|
| 60 | ... and replace them with: |
|---|
| 61 | |
|---|
| 62 | $config['nets'][] = "10.10.0.0/24"; |
|---|
| 63 | |
|---|
| 64 | ... notice that we only have ONE network for now: the backbone. |
|---|
| 65 | We'll configure more networks later! |
|---|
| 66 | |
|---|
| 67 | Save the file and exit. |
|---|
| 68 | |
|---|
| 69 | 5. Add a host - your own router |
|---|
| 70 | |
|---|
| 71 | $ cd /opt/observium |
|---|
| 72 | $ ./addhost.php rtrX.ws.nsrc.org NetManage v2c |
|---|
| 73 | |
|---|
| 74 | (Notice that here we use the HOSTNAME and NOT the IP of the host!) |
|---|
| 75 | |
|---|
| 76 | Check on the Web interface that the host has been found: |
|---|
| 77 | |
|---|
| 78 | http://observiumX.ws.nsrc.org/devices/ |
|---|
| 79 | |
|---|
| 80 | ... you can explore the web interface for a few minutes - but |
|---|
| 81 | there is no data yet! |
|---|
| 82 | |
|---|
| 83 | We can tell Observium to start collecting data for this host, by |
|---|
| 84 | running the following command: |
|---|
| 85 | |
|---|
| 86 | $ sudo ./poller.php -h all |
|---|
| 87 | |
|---|
| 88 | ... Of course, we don't want to do this manually! We will automate |
|---|
| 89 | this in the next steps. |
|---|
| 90 | |
|---|
| 91 | 6. Tell Observium to run a discovery (scan) of the network, and start |
|---|
| 92 | collecting data: |
|---|
| 93 | |
|---|
| 94 | $ cd /opt/observium |
|---|
| 95 | $ sudo ./discovery.php -h all |
|---|
| 96 | |
|---|
| 97 | Note that a LOT of information will appear! |
|---|
| 98 | |
|---|
| 99 | We'll run a data collection again manually: |
|---|
| 100 | |
|---|
| 101 | $ sudo ./poller.php -h all |
|---|
| 102 | |
|---|
| 103 | |
|---|
| 104 | 7. Go back to the web interface |
|---|
| 105 | |
|---|
| 106 | http://observiumX.ws.nsrc.org/ |
|---|
| 107 | |
|---|
| 108 | What do you notice ? How do you think Observium figured out what |
|---|
| 109 | devices to monitor ? |
|---|
| 110 | |
|---|
| 111 | |
|---|
| 112 | 8. Enable cron jobs |
|---|
| 113 | |
|---|
| 114 | It's time to make the data collection happen automatically. |
|---|
| 115 | |
|---|
| 116 | A number of automated maintenance tasks need to be added: |
|---|
| 117 | |
|---|
| 118 | - Create the file /etc/cron.d/observium: |
|---|
| 119 | |
|---|
| 120 | $ sudo editor /etc/cron.d/observium |
|---|
| 121 | |
|---|
| 122 | ... and paste the following lines: |
|---|
| 123 | |
|---|
| 124 | 33 */6 * * * root /opt/observium/discovery.php -h all >> /dev/null 2>&1 |
|---|
| 125 | */5 * * * * root /opt/observium/discovery.php -h new >> /dev/null 2>&1 |
|---|
| 126 | */5 * * * * root /opt/observium/poller.php -h all >> /dev/null 2>&1 |
|---|
| 127 | |
|---|
| 128 | It will take a little while for data to appear in the graphs. |
|---|
| 129 | |
|---|
| 130 | 9. While we wait for the traffic to appear, we can navigate the interface. |
|---|
| 131 | |
|---|
| 132 | Go to http://observiumX.ws.nsrc.org/ |
|---|
| 133 | |
|---|
| 134 | Click on "Devices" in menu at the top. |
|---|
| 135 | |
|---|
| 136 | Find the router for your group in the list, and click on its name. |
|---|
| 137 | |
|---|
| 138 | You will land on the Overview page for your device. |
|---|
| 139 | |
|---|
| 140 | You will notice that Observium has automatically detected many, many |
|---|
| 141 | things about your router! |
|---|
| 142 | |
|---|
| 143 | At the top, under your router's hostname, you will see a list of tabs, |
|---|
| 144 | all of them presenting information about your device: |
|---|
| 145 | |
|---|
| 146 | Overview | Graphs | Health | Ports | Routing | Map | Inventory | Logs | Alerts |
|---|
| 147 | |
|---|
| 148 | Under "Graphs", you will see all information which can be presented in |
|---|
| 149 | the form of a graph: Network IO, Disk IO, Memory and CPU usage, etc... |
|---|
| 150 | |
|---|
| 151 | You will also see the "Health" tab, which offers various metrics on |
|---|
| 152 | how the device is doing hardware wise - if this information is available - |
|---|
| 153 | such as temperature, voltage, fan speed, etc... Notice that some of this |
|---|
| 154 | information is already shown in the overview page for the device (which |
|---|
| 155 | you get when you click on the name of the device). |
|---|
| 156 | |
|---|
| 157 | Next we'll take a look at the Ports menu tab. Under "Ports" you will find |
|---|
| 158 | a summary of traffic for all ports, including bits per second and packets |
|---|
| 159 | per second, port speed, and the type of connection (Ethernet or other). |
|---|
| 160 | |
|---|
| 161 | Note that all elements can be clicked on, including the small graphs, and |
|---|
| 162 | you will be taken to the corresponding page for the data source. |
|---|
| 163 | |
|---|
| 164 | The Routing tab will present you with an overview of enabled routing |
|---|
| 165 | protocols. If you have enabled OSPF or BGP on your routers, you will |
|---|
| 166 | get information about the active sessions, neighbors or peers, and |
|---|
| 167 | other protocol specific information. |
|---|
| 168 | |
|---|
| 169 | The Map tab is an automatically generated diagram of the topology of |
|---|
| 170 | your network, as seen from the point of view of your router. This will |
|---|
| 171 | only function for CDP/LLDP enabled devices (Cisco, IOS, ...) |
|---|
| 172 | |
|---|
| 173 | Inventory contains a full list of hardware modules and serial numbers |
|---|
| 174 | for equipment installed on your router. Note that this will not work on |
|---|
| 175 | all vendors. |
|---|
| 176 | |
|---|
| 177 | Under Logs you will see a list of events for your router: changes that |
|---|
| 178 | have taken place in the configuration of the device, or in the state |
|---|
| 179 | of interfaces, services, etc... |
|---|
| 180 | |
|---|
| 181 | Alerts is currently empty for your router - we will see more about this |
|---|
| 182 | later. |
|---|
| 183 | |
|---|
| 184 | 10. Add a location and contact for your router |
|---|
| 185 | |
|---|
| 186 | If you navigate back to the Overview page for your router |
|---|
| 187 | (Go to Devices, click on your router's name), you will see that |
|---|
| 188 | Observium has picked up the Hardware platform, the Operating System |
|---|
| 189 | and the Uptime for your device. |
|---|
| 190 | |
|---|
| 191 | Now, log into your router with SSH and add the following information |
|---|
| 192 | to your SNMP configuration: |
|---|
| 193 | |
|---|
| 194 | - Set the location (whatever you want: city, country, etc...) |
|---|
| 195 | - Set the contact (email address or name) |
|---|
| 196 | |
|---|
| 197 | To do this: |
|---|
| 198 | |
|---|
| 199 | rtr8> enable |
|---|
| 200 | Password: |
|---|
| 201 | rtr8# conf terminal |
|---|
| 202 | Enter configuration commands, one per line. End with CNTL/Z. |
|---|
| 203 | rtr8(config)# snmp-server contact user@email.address |
|---|
| 204 | rtr8(config)# snmp-server location Here in Bhutan, Thimphu |
|---|
| 205 | rtr8(config)# exit |
|---|
| 206 | rtr8# write memory |
|---|
| 207 | |
|---|
| 208 | If you wait a few minutes (maximum 5), you should see this information |
|---|
| 209 | appear automatically on the Overview tab for your router in Observium. |
|---|
| 210 | |
|---|
| 211 | While you are still logged in to your router, add a pseudo interface |
|---|
| 212 | to your router, to see if Observium will pick it up: |
|---|
| 213 | |
|---|
| 214 | rtr8(config)# interface loopback123 |
|---|
| 215 | rtr8(config-if)# description A useless interface |
|---|
| 216 | rtr8(config-if)# exit |
|---|
| 217 | rtr8(config)# exit |
|---|
| 218 | rtr8# write memory |
|---|
| 219 | |
|---|
| 220 | This should also show up in Observium after a while - try and |
|---|
| 221 | find it under "Ports" |
|---|
| 222 | |
|---|
| 223 | 11. IP address lookup |
|---|
| 224 | |
|---|
| 225 | From Observium's main page, you will find, under the Overview menu |
|---|
| 226 | (at the TOP of the page), 4 options: |
|---|
| 227 | |
|---|
| 228 | IPv4 search -> http://observiumX.ws.nsrc.org/search/search=ipv4/ |
|---|
| 229 | IPv6 search -> http://observiumX.ws.nsrc.org/search/search=ipv6/ |
|---|
| 230 | MAC search -> http://observiumX.ws.nsrc.org/search/search=mac/ |
|---|
| 231 | ARP tables -> http://observiumX.ws.nsrc.org/search/search=arp/ |
|---|
| 232 | |
|---|
| 233 | Using the IPv4 and ARP table searches, try and search IPs of |
|---|
| 234 | equipment in the class: |
|---|
| 235 | |
|---|
| 236 | - IP of the GW (10.10.0.254) |
|---|
| 237 | - IPs of the routers (10.10.0.X, 10.10.X.254) |
|---|
| 238 | - IPs of the PCs (10.10.1.1, 10.10.5.17, etc...) |
|---|
| 239 | |
|---|
| 240 | - Try and search IPs for your OWN laptop! |
|---|
| 241 | Find the IP of you own laptop, and see if you can search it in |
|---|
| 242 | Observium. Can you ? Why ? |
|---|
| 243 | |
|---|
| 244 | |
|---|
| 245 | 13. Let's disable ports that are unuse on the router/switch! |
|---|
| 246 | |
|---|
| 247 | Find the Overview page for "rtr.ws.nsrc.org". |
|---|
| 248 | |
|---|
| 249 | From there, you can configure the device (the "key" icon on the top |
|---|
| 250 | right). You are then presented with a configuration page for the device. |
|---|
| 251 | |
|---|
| 252 | Click on Ports, then you will get an overview of the Port status |
|---|
| 253 | on the switch. Look at the ones that are "down". |
|---|
| 254 | |
|---|
| 255 | For those that are "down", check the "Ignore" box, then "Save" |
|---|
| 256 | under "Index". |
|---|
| 257 | |
|---|
| 258 | If you call back the main Observium page: |
|---|
| 259 | |
|---|
| 260 | http://observiumX.ws.nsrc.org/ |
|---|
| 261 | |
|---|
| 262 | ... Observium should no longer complain about these ports! |
|---|
| 263 | |
|---|
| 264 | 14. Have you tried adding your PC yet ? Other peoples ? |
|---|
| 265 | |
|---|
| 266 | More fun things: |
|---|
| 267 | |
|---|
| 268 | - From the top menu, choose Devices -> All devices |
|---|
| 269 | - Find your router, and click on it on the list. |
|---|
| 270 | - Below the graph summary, you'll see a list of the interfaces on your router: |
|---|
| 271 | |
|---|
| 272 | Fa0/0, Fa0/1, Null0 |
|---|
| 273 | |
|---|
| 274 | - Click on Fa0/0 |
|---|
| 275 | - Click on "Real Time" |
|---|