Installing SmokePing as a Slave ----------------------------------------------------- * Prequisites: Fully functional SmokePing installation to act as the Master * References: http://oss.oetiker.ch/smokeping/doc/smokeping_master_slave.en.html Instructions tested on Ubuntu 8.10 Server ONLY Run all commands as root ($ sudo -s, then run all commands) 1) SLAVE Setup Instructions Setup Smokeping # apt-get install smokeping - No configuration files are necessary for slave installations - Technically, you don't need SpeedyCGI for slave installations, but you'll get everything with the Ubuntu package - If you want to run SmokePing as a master or stand-alone installation, you will have all the files you need Create a file containing a password to be used as a shared secret # editor /etc/smokeping/slave_secret - Enter a strong password on the first line of the new file, then save the file - Note, /etc/smokeping/slave_secret will contain one word, the password, and nothing else Set appropriate permissions on this file # chmod 600 /etc/smokeping/slave_secret # chown smokeping:root /etc/smokeping/slave_secret Create the cache directory and set appropriate persmissions # mkdir /var/smokeping # chown smokeping:root /var/smokeping Modify the init.d Daemon script so /etc/init.d/smokeping start | stop | restart works # editor /etc/init.d/smokeping Change "MODE=master" to "MODE=slave" Change DAEMON_ARGS="" to "DAEMON_ARGS="--master-url=http:///" --cache-dir=/var/smokeping/ --shared-secret=/etc/smokeping/slave-secret" Restart SmokePing # /etc/init.d/smokeping restart 2) MASTER Setup Instructions Create a file containing the password to be used as a shared secret # editor /etc/smokeping/master_secrets - 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 Set appropriate permisssions on this file # chmod 640 /etc/smokeping/master_secrets # chown www-data:root /etc/smokeping/master_secrets Modify the SmokePing Slaves configuration file # editor /etc/smokeping/config.d/Slaves - 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 +myhostname display_name=myhostname color=0000ff ------ Modify the SmokePint Targets configuration file # editor /etc/smokeping/config.d/Targets - 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 ------ Restart SmokePing # /etc/init.d/smokeping stop # /etc/init.d/smokeping start