Agenda: sample-smokeping-master-slave.txt

File sample-smokeping-master-slave.txt, 3.3 KB (added by admin, 6 years ago)
Line 
1Installing SmokePing as a Slave
2-----------------------------------------------------
3* Prequisites:  Fully functional SmokePing installation to act as the Master
4* References:  http://oss.oetiker.ch/smokeping/doc/smokeping_master_slave.en.html
5
6Instructions tested on Ubuntu 8.10 Server ONLY
7
8Run all commands as root ($ sudo bash, then run all commands)
9
101) SLAVE Setup Instructions
11
12Setup Smokeping
13
14        # apt-get install smokeping
15
16- No configuration files are necessary for slave installations
17- Technically, you don't need SpeedyCGI for slave installations, but you'll get everything with the Ubuntu package
18- If you want to run SmokePing as a master or stand-alone installation, you will have all the files you need
19
20
21Create a file containing a password to be used as a shared secret
22
23        #  pico /etc/smokeping/slave_secret
24
25- Enter a strong password on the first line of the new file, then save the file
26- Note, /etc/smokeping/slave_secret will contain one word, the password, and nothing else
27
28Set appropriate permissions on this file
29
30        # chmod 600 /etc/smokeping/slave_secret
31        # chown smokeping:root /etc/smokeping/slave_secret
32
33Create the cache directory and set appropriate persmissions
34
35        # mkdir /var/smokeping
36        # chown smokeping:root /var/smokeping
37
38Modify the init.d Daemon script so /etc/init.d/smokeping start | stop | restart works
39
40        # pico /etc/init.d/smokeping
41
42  Change "MODE=master" to "MODE=slave"
43  Change DAEMON_ARGS="" to "DAEMON_ARGS="--master-url=http://<master_IP>/<path to smokeping.cgi>" --cache-dir=/var/smokeping/ --shared-secret=/etc/smokeping/slave-secret"
44
45Restart SmokePing
46
47        # /etc/init.d/smokeping restart
48
492) MASTER Setup Instructions
50
51Create a file containing the password to be used as a shared secret
52
53        # pico /etc/smokeping/master_secrets
54
55- Enter the hostname (hostname only, not fully qualified domain name) followed by a colon, followed by the password on one line
56  The password should match what you created on your slave SmokePing installation in /etc/smokeping/slave_secret
57  The hostname is the name of the host running the slave installation of SmokePing
58  If you have multiple slaves, put the hostname:password combinations on separate lines
59  Example:  myhostname:mypassword
60
61Set appropriate permisssions on this file
62
63        # chmod 640 /etc/smokeping/master_secrets
64        # chown www-data:root /etc/smokeping/master_secrets
65
66Modify the SmokePing Slaves configuration file
67
68        # pico /etc/smokeping/config.d/Slaves
69
70- This file should be as follows, but replace 'myhostname' with the hostname of your slave SmokePing installation
71  The display_name can be whatever you wish but should be descriptive of where the slave is located
72  If you have multiple slaves, put in additional +myhostname, display_name, and color lines
73------
74 *** Slaves ***
75#
76## make sure this is not world-readable!
77secrets=/etc/smokeping/masters-secrets
78
79
80+myhostname
81display_name=myhostname
82color=0000ff
83------
84
85Modify the SmokePint Targets configuration file
86
87        # pico /etc/smokeping/config.d/Targets
88
89- Add the following line under the *** Targets *** title, replacing myhostname with the name of your slave Smokeping installation
90  If you have multiple slaves, put them all on one line separate by spaces
91------
92slaves = myhostname
93------
94
95Restart SmokePing
96
97        # /etc/init.d/smokeping stop
98        # /etc/init.d/smokeping start