Agenda: sample-smokeping-master-slave.htm

File sample-smokeping-master-slave.htm, 4.6 KB (added by admin, 5 years ago)
Line 
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></title>
8  <style type="text/css">code{white-space: pre;}</style>
9  <link rel="stylesheet" href="../../style.css" type="text/css" />
10</head>
11<body>
12<div id="TOC">
13<ul>
14<li><a href="#installing-smokeping-as-a-slave"><span class="toc-section-number">0.1</span> Installing SmokePing as a Slave</a></li>
15</ul>
16</div>
17<h2 id="installing-smokeping-as-a-slave"><a href="#installing-smokeping-as-a-slave"><span class="header-section-number">0.1</span> Installing SmokePing as a Slave</a></h2>
18<ul>
19<li>Prequisites: Fully functional SmokePing installation to act as the Master</li>
20<li>References: http://oss.oetiker.ch/smokeping/doc/smokeping_master_slave.en.html</li>
21</ul>
22<p>Instructions tested on Ubuntu 8.10 Server ONLY</p>
23<p>Run all commands as root ($ sudo -s, then run all commands)</p>
24<ol style="list-style-type: decimal">
25<li>SLAVE Setup Instructions</li>
26</ol>
27<p>Setup Smokeping</p>
28<pre><code># apt-get install smokeping</code></pre>
29<ul>
30<li>No configuration files are necessary for slave installations</li>
31<li>Technically, you don't need SpeedyCGI for slave installations, but you'll get everything with the Ubuntu package</li>
32<li>If you want to run SmokePing as a master or stand-alone installation, you will have all the files you need</li>
33</ul>
34<p>Create a file containing a password to be used as a shared secret</p>
35<pre><code>#  pico /etc/smokeping/slave_secret</code></pre>
36<ul>
37<li>Enter a strong password on the first line of the new file, then save the file</li>
38<li>Note, /etc/smokeping/slave_secret will contain one word, the password, and nothing else</li>
39</ul>
40<p>Set appropriate permissions on this file</p>
41<pre><code># chmod 600 /etc/smokeping/slave_secret
42# chown smokeping:root /etc/smokeping/slave_secret</code></pre>
43<p>Create the cache directory and set appropriate persmissions</p>
44<pre><code># mkdir /var/smokeping
45# chown smokeping:root /var/smokeping</code></pre>
46<p>Modify the init.d Daemon script so /etc/init.d/smokeping start | stop | restart works</p>
47<pre><code># pico /etc/init.d/smokeping</code></pre>
48<p>Change &quot;MODE=master&quot; to &quot;MODE=slave&quot; Change DAEMON_ARGS=&quot;&quot; to &quot;DAEMON_ARGS=&quot;--master-url=http://<master_IP>/<path to smokeping.cgi>&quot; --cache-dir=/var/smokeping/ --shared-secret=/etc/smokeping/slave-secret&quot;</p>
49<p>Restart SmokePing</p>
50<pre><code># /etc/init.d/smokeping restart</code></pre>
51<ol start="2" style="list-style-type: decimal">
52<li>MASTER Setup Instructions</li>
53</ol>
54<p>Create a file containing the password to be used as a shared secret</p>
55<pre><code># pico /etc/smokeping/master_secrets</code></pre>
56<ul>
57<li>Enter the hostname (hostname only, not fully qualified domain name) followed by a colon, followed by the password on one line The password should match what you created on your slave SmokePing installation in /etc/smokeping/slave_secret The hostname is the name of the host running the slave installation of SmokePing If you have multiple slaves, put the hostname:password combinations on separate lines Example: myhostname:mypassword</li>
58</ul>
59<p>Set appropriate permisssions on this file</p>
60<pre><code># chmod 640 /etc/smokeping/master_secrets
61# chown www-data:root /etc/smokeping/master_secrets</code></pre>
62<p>Modify the SmokePing Slaves configuration file</p>
63<pre><code># pico /etc/smokeping/config.d/Slaves</code></pre>
64<ul>
65<li>This file should be as follows, but replace 'myhostname' with the hostname of your slave SmokePing installation The display_name can be whatever you wish but should be descriptive of where the slave is located If you have multiple slaves, put in additional +myhostname, display_name, and color lines ------ *** Slaves *** # ## make sure this is not world-readable! secrets=/etc/smokeping/masters-secrets</li>
66</ul>
67<p>+myhostname display_name=myhostname color=0000ff ------</p>
68<p>Modify the SmokePint Targets configuration file</p>
69<pre><code># pico /etc/smokeping/config.d/Targets</code></pre>
70<ul>
71<li>Add the following line under the *** Targets *** title, replacing myhostname with the name of your slave Smokeping installation If you have multiple slaves, put them all on one line separate by spaces ------ slaves = myhostname ------</li>
72</ul>
73<p>Restart SmokePing</p>
74<pre><code># /etc/init.d/smokeping stop
75# /etc/init.d/smokeping start</code></pre>
76</body>
77</html>