1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
---|
2 | <html xmlns="http://www.w3.org/1999/xhtml"> |
---|
3 | <head> |
---|
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</title> |
---|
8 | <style type="text/css">code{white-space: pre;}</style> |
---|
9 | <link rel="stylesheet" href="http://noc.ws.nsrc.org/configs/css/style.css" type="text/css" /> |
---|
10 | </head> |
---|
11 | <body> |
---|
12 | <div id="header"> |
---|
13 | <h1 class="title">Observium</h1> |
---|
14 | </div> |
---|
15 | <div id="TOC"> |
---|
16 | <ul> |
---|
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> |
---|
20 | </ul></li> |
---|
21 | <li><a href="#observium-installation"><span class="toc-section-number">2</span> Observium installation</a><ul> |
---|
22 | <li><a href="#installation-based-on-offical-instructions"><span class="toc-section-number">2.1</span> 1. Installation based on offical instructions</a></li> |
---|
23 | <li><a href="#configure-your-virtualhost-for-observium"><span class="toc-section-number">2.2</span> 2. Configure your virtualhost for Observium</a></li> |
---|
24 | </ul></li> |
---|
25 | <li><a href="#enable-your-new-virtual-host"><span class="toc-section-number">3</span> 2. Enable your new virtual host</a></li> |
---|
26 | </ul> |
---|
27 | </div> |
---|
28 | <h1 id="introduction"><a href="#introduction"><span class="header-section-number">1</span> Introduction</a></h1> |
---|
29 | <h2 id="goals"><a href="#goals"><span class="header-section-number">1.1</span> Goals</a></h2> |
---|
30 | <ul> |
---|
31 | <li>Learn how to install observium</li> |
---|
32 | </ul> |
---|
33 | <h2 id="notes"><a href="#notes"><span class="header-section-number">1.2</span> Notes</a></h2> |
---|
34 | <ul> |
---|
35 | <li>Commands preceded with "$" imply that you should execute the command as a general user - not as root.</li> |
---|
36 | <li>Commands preceded with "#" imply that you should be working as root.</li> |
---|
37 | <li>Commands with more specific command lines (e.g. "rtrX>" or "mysql>") imply that you are executing commands on remote equipment, or within another program.</li> |
---|
38 | </ul> |
---|
39 | <h1 id="observium-installation"><a href="#observium-installation"><span class="header-section-number">2</span> Observium installation</a></h1> |
---|
40 | <h2 id="installation-based-on-offical-instructions"><a href="#installation-based-on-offical-instructions"><span class="header-section-number">2.1</span> 1. Installation based on offical instructions</a></h2> |
---|
41 | <p>Do note that you will need to run the commands that require you to install packages using <code>sudo</code>, or temporarily switch to using a root shell with <code>sudo -s</code></p> |
---|
42 | <p>The instructions below are take from:</p> |
---|
43 | <p>http://www.observium.org/wiki/Debian_Ubuntu_Installation</p> |
---|
44 | <p>We have made a couple of minor changes, but the URL above is the authoritative source of how to install Observium.</p> |
---|
45 | <p>We will do this installation as the root user. Connect to your virtual machine as user sysadm and then do:</p> |
---|
46 | <pre><code>$ sudo -s |
---|
47 | # apt-get update |
---|
48 | # apt-get install libapache2-mod-php5 php5-cli php5-mysql php5-gd php5-snmp php-pear snmp graphviz \ |
---|
49 | php5-mcrypt php5-json subversion mysql-server mysql-client rrdtool fping \ |
---|
50 | imagemagick whois mtr-tiny nmap ipmitool python-mysqldb</code></pre> |
---|
51 | <p>This will take some time.</p> |
---|
52 | <p>When or if prompted for the mysql root password this should be your <CLASS PASSWORD>.</p> |
---|
53 | <p>Once packages finish installing we do:</p> |
---|
54 | <pre><code># mkdir -p /opt/observium && cd /opt |
---|
55 | # wget http://noc.ws.nsrc.org/downloads/observium/observium-community-latest.tar.gz |
---|
56 | # tar zxvf observium-community-latest.tar.gz |
---|
57 | # cd observium |
---|
58 | # cp config.php.default config.php |
---|
59 | # editor config.php</code></pre> |
---|
60 | <p>Find these two lines:</p> |
---|
61 | <pre><code>$config['db_user'] = 'USERNAME'; |
---|
62 | $config['db_pass'] = 'PASSWORD';</code></pre> |
---|
63 | <p>and change them to be:</p> |
---|
64 | <pre><code>$config['db_user'] = 'observium'; |
---|
65 | $config['db_pass'] = '<CLASS PASSWORD>';</code></pre> |
---|
66 | <p>Exit and save the file.</p> |
---|
67 | <p>Now we need to create an Observium database and set the password for the observium user as well as set privileges for the user. The "mysql root password" noted below should be your <CLASS PASSWORD>:</p> |
---|
68 | <pre><code># mysql -u root -p <mysql root password> |
---|
69 | mysql> CREATE DATABASE observium; |
---|
70 | mysql> GRANT ALL PRIVILEGES ON observium.* TO 'observium'@'localhost' IDENTIFIED BY '<observium db password>'; |
---|
71 | mysql> exit</code></pre> |
---|
72 | <p>Now we populate the database and create a couple of directories:</p> |
---|
73 | <pre><code># cd /opt/observium |
---|
74 | # php includes/update/update.php |
---|
75 | # mkdir rrd |
---|
76 | # chown www-data:www-data rrd |
---|
77 | # mkdir logs |
---|
78 | # chown www-data logs</code></pre> |
---|
79 | <p>Now we create an observium user named "admin" with privileges to update/add/delete entries via the observium web interface:</p> |
---|
80 | <pre><code># ./adduser.php admin <CLASS_PASSWORD> 10</code></pre> |
---|
81 | <h2 id="configure-your-virtualhost-for-observium"><a href="#configure-your-virtualhost-for-observium"><span class="header-section-number">2.2</span> 2. Configure your virtualhost for Observium</a></h2> |
---|
82 | <p>Make sure that the name "observiumX.ws.nsrc.org", where X is the number of your machine, works:</p> |
---|
83 | <pre><code># ping observiumX.ws.nsrc.org |
---|
84 | PING observiumX.ws.nsrc.org (10.10.9.34) 56(84) bytes of data. |
---|
85 | 64 bytes from pcX.ws.nsrc.org (10.10.9.34): icmp_req=1 ttl=64 time=0.014 ms |
---|
86 | 64 bytes from pcX.ws.nsrc.org (10.10.9.34): icmp_req=2 ttl=64 time=0.059 ms |
---|
87 | ^C</code></pre> |
---|
88 | <p>(Of course this will only work if the DNS for your class has been set up with entries for your Observium virtual hosts, which your instructors should have done).</p> |
---|
89 | <pre><code># cd /etc/apache2/sites-available |
---|
90 | # editor observium</code></pre> |
---|
91 | <p>In this file add the following:</p> |
---|
92 | <pre><code><VirtualHost *:80> |
---|
93 | DocumentRoot /opt/observium/html/ |
---|
94 | ServerName observiumX.ws.nsrc.org |
---|
95 | CustomLog /opt/observium/logs/access_log combined |
---|
96 | ErrorLog /opt/observium/logs/error_log |
---|
97 | <Directory "/opt/observium/html/"> |
---|
98 | AllowOverride All |
---|
99 | Options FollowSymLinks MultiViews |
---|
100 | </Directory> |
---|
101 | </VirtualHost></code></pre> |
---|
102 | <p>Note the line that reads:</p> |
---|
103 | <pre><code> ServerName observiumX.ws.nsrc.org</code></pre> |
---|
104 | <p>... and replace "X" with the number of your virtual machine.</p> |
---|
105 | <p>Save the file and exit.</p> |
---|
106 | <h1 id="enable-your-new-virtual-host"><a href="#enable-your-new-virtual-host"><span class="header-section-number">3</span> 2. Enable your new virtual host</a></h1> |
---|
107 | <pre><code># a2enmod rewrite |
---|
108 | # a2ensite observium |
---|
109 | # service apache2 restart</code></pre> |
---|
110 | <p>Now let's go back to being the sysadm user:</p> |
---|
111 | <pre><code># exit |
---|
112 | $</code></pre> |
---|
113 | <p>Observium has now been installed and initially configured on your virutal machine. In the next lab you will do the following:</p> |
---|
114 | <ul> |
---|
115 | <li>Connect to Observium via a web browser</li> |
---|
116 | <li>Configure Observium to auto-discover devices</li> |
---|
117 | <li>Add a device manually s via the web interface</li> |
---|
118 | <li>Use the command line to add multiple devices</li> |
---|
119 | <li>Automate the discovery and update process of devices</li> |
---|
120 | <li>Update your router with contact and location information</li> |
---|
121 | <li>Update your Observium location map</li> |
---|
122 | <li>Disable some ports on a device</li> |
---|
123 | <li>Use the Observium interface to search for specific information</li> |
---|
124 | </ul> |
---|
125 | </body> |
---|
126 | </html> |
---|