On 4/11/2013 3:29, Trash NMICHEL wrote: > Hi and thanks for your insights :! > > Here is what I did : > > ****** MASTER******* > > > root@ubuntu:/home/nml# ls -lua /etc/smokeping/ > total 44 > drwxr-xr-x 3 root root 4096 Apr 11 09:05 . > drwxr-xr-x 86 root root 4096 Apr 11 09:04 .. > -rw-r--r-- 1 root root 191 Apr 10 22:33 apache2.conf > -rw-r--r-- 1 root root 2031 Apr 10 22:36 basepage.html > -rw-r--r-- 1 root root 290 Apr 10 22:33 config > drwxr-xr-x 2 root root 4096 Apr 11 09:12 config.d > -r-------- 1 smokeping www-data 19 Apr 11 09:05 slave-secrets > -r-------- 1 smokeping www-data 5 Apr 11 09:05 slavesecrets.conf > -rw-r--r-- 1 root root 1564 Apr 10 22:33 smokemail > -rw-r----- 1 smokeping smokeping 59 Apr 10 22:33 smokeping_secrets > -rw-r--r-- 1 root root 3815 Apr 10 22:33 tmail > > > root@ubuntu:/home/nml# cat /etc/smokeping/slavesecrets.conf > test > root@ubuntu:/home/nml# cat /etc/smokeping/slave-secrets > ubuntu:test > > root@ubuntu:/home/nml# cat /etc/smokeping/config.d/Slaves > *** Slaves *** > secrets=/etc/smokeping/slave-secrets > #+boomer > #display_name=boomer > #color=0000ff > > #+slave2 > #display_name=another > #color=00ff00 > > +ubuntu > display_name=ubuntu > color=00ff00 > > > root@ubuntu:/home/nml# cat /etc/smokeping/config.d/Targets > *** Targets *** > > probe = FPing > > menu = Top > title = Network Latency Grapher > remark = Welcome to the SmokePing website of xxx Company. \ > Here you will learn all about the latency of our network. > > + Local > > menu = Local > title = Local Network > #parents = owner:/Test/James location:/ > > ++ LocalMachine > > menu = Local Machine > title = This host > host = localhost > #alerts = someloss > > > ++ Site1 > > menu = SLAVE > title = SLAVE_TITLE > host = google.fr > slaves = ubuntu > > root@ubuntu:/home/nml#
> ****** SLAVE******* > > root@ubuntu:/etc/smokeping# cat /etc/default/smokeping > # /etc/default/smokeping: Startup configuration for smokeping(1) > # > # select master or slave mode > MODE=slave > # in master mode, the rest of the configuration is in > # /etc/smokeping/config > # > # in slave mode, uncomment and set the following variables too > # see smokeping(1) > # > # Mandatory configuration > MASTER_URL=http://172.16.119.236/cgi-bin/smokeping.cgi > SHARED_SECRET=/etc/smokeping/slavesecrets.conf > # > # Optional configuration > SLAVE_NAME=ubuntu > > > root@ubuntu:/etc/smokeping# ls -lus > total 32 > 4 -rw-r--r-- 1 root root 191 Apr 10 22:35 apache2.conf > 4 -rw-r--r-- 1 root root 2031 Apr 10 22:37 basepage.html > 4 -rw-r--r-- 1 root root 290 Apr 10 22:35 config > 4 drwxr-xr-x 2 root root 4096 Apr 10 22:34 config.d > 4 -r-------- 1 smokeping root 5 Apr 11 09:17 slavesecrets.conf > 4 -rw-r--r-- 1 root root 1564 Apr 10 22:35 smokemail > 4 -rw-r----- 1 smokeping smokeping 59 Apr 10 22:35 smokeping_secrets > 4 -rw-r--r-- 1 root root 3815 Apr 10 22:35 tmail > root@ubuntu:/etc/smokeping# cat /etc/smokeping/slavesecrets.conf > test > > > When I restart the master, everything goes fine ... > > When I restart the slave ... it can connect to the master but I get this > error : > root@ubuntu:/etc/smokeping# /etc/init.d/smokeping restart > * Shutting down latency logger daemon smokeping > start-stop-daemon: warning: failed to kill 942: No such process > ...done. > * Starting latency logger daemon smokeping > WARNING: Opening secrets file /etc/smokeping/slave-secrets: Permission > denied > > ERROR: we did not get config from the master. Maybe we are not configured > as a slave for any of the targets on the master ? > ...done. > > > I was thinking more about a permission error but then I did this on the > MASTER: > > root@ubuntu:/home/nml# chmod 777 /etc/smokeping/slave-secrets > > Then the master is not working any more : > > root@ubuntu:/home/nml# /etc/init.d/smokeping restart > * Shutting down latency logger daemon smokeping > ...done. > * Starting latency logger daemon smokeping > ERROR: /etc/smokeping/config.d/Slaves, line 2: File > '/etc/smokeping/slave-secrets' is world-readable or writable, refusing it > ...done. > > > Can someone help a Linux noob ? :P > > Thanks for your help guys > > > Nic [..] Snipping due to overly long quoting. The key error is this: ERROR: /etc/smokeping/config.d/Slaves, line 2: File '/etc/smokeping/slave-secrets' is world-readable or writable, refusing it ...done. This is an error on the *Master*, the file needs to be *readable* by the smokeping user and the www-data group. On the master: $ chown smokeping:www-data /etc/smokeping/slave-secrets $ chmod 440 /etc/smokeping/slave-secrets That should solve the "Permission denied" error from the slave. Essentially the issue was that the file was only *readable* by the smokeping user on the master but not the www-data group as it needs to be for the slave to pull the file. -r-------- 1 smokeping www-data 19 Apr 11 09:05 slave-secrets -- staticsafe O< ascii ribbon campaign - stop html mail - www.asciiribbon.org Please don't top post - http://goo.gl/YrmAb Don't CC me! I'm subscribed to whatever list I just posted on. _______________________________________________ smokeping-users mailing list smokeping-users@lists.oetiker.ch https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users