[smokeping-users] New User and Trying to setup a Master/Slave topology
Trash NMICHEL
trash at nmichel.fr
Thu Apr 11 09:29:44 CEST 2013
Hi and thanks for your insights :!
Here is what I did :
****** MASTER*******
root at 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 at ubuntu:/home/nml# cat /etc/smokeping/slavesecrets.conf
test
root at ubuntu:/home/nml# cat /etc/smokeping/slave-secrets
ubuntu:test
root at 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 at 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 at ubuntu:/home/nml#
****** SLAVE*******
root at 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 at 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 at 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 at 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 at ubuntu:/home/nml# chmod 777 /etc/smokeping/slave-secrets
Then the master is not working any more :
root at 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
2013/4/10 staticsafe <me at staticsafe.ca>
> On 4/10/2013 17:10, Trash NMICHEL wrote:
> > Hey guys.
> >
> > I am a new member that discovered this AWESOME tool today. I m going to
> use
> > it at every customer that I ll visit for sure because it gives so much
> > visibility on the network.
> > I am a network engineer located in Switzerland and specialized into
> > Routing/Switching , Security and also VoIP. I have very small experience
> > with Linux so please forgive me for that :)
> >
> >
> > I have been running Smokeping on Ubuntu server 12.04 LTS 64 bit today
> and I
> > would like to implement the Master/Slave topology
> >
> > I understood from the documentation that the slave will get his
> > configuration from the master here is what I did :
> >
> >
> > - Install Smokeping on both server: I got graphs working to the localhost
> > so hence the RDD is OK
> > - MASTER
> >
> > Created */etc/smokeping/slavesecrets.conf *and
> /etc/smokeping/slave-secrets
> >
> > did a vim on slavesecrets and added the key : test
> > did a vim on slave-secret and added the text : ubuntu.local:test
> >
> > Modified the /etc/smokeping/Slave to have the
> > +slave
> > display_names=ubuntu text.
> > color=blablabla
> >
> > Modified the Target in order to push the config to the slave :
> > ++ Site 1
> > menu = Corp
> > title = CORP - slave1.test.com
> > host = X.X.X.X
> > slaves = ubuntu
> >
> >
> >
> >
> >
> > - SLAVE
> >
> > /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://x.x.x.x/cgi-bin/smokeping.cgi
> > SHARED_SECRET=/etc/smokeping/slavesecrets.conf
> > #
> > # Optional configuration
> > SLAVE_NAME=ubuntu
> >
> >
> > *touch and vim /etc/smokeping/slavesecrets.conf in order to have the same
> > secretkey : test
> > *
> >
> >
> >
> > *Now it is clearly not working and I have no idea why ... can someone
> > provide some insights and let me know what they think ?
> >
> > Thanks a lot for the help provided
> >
> > Nicolas
>
> It is not working because you specified the name of the slave wrong in
> /etc/smokeping/Slave.
>
> You put "slave" as the name of the slave. Here is an example of a slave
> from my config:
>
> +ferrovax
> display_name=ferrovax (LA, USA)
> color=b95de6
> location=LA,CA,USA
>
> The first line in that excerpt defines the name of the slave you put in
> /etc/defaults/smokeping on the slave host. So in your case it would be
> "+ubuntu".
>
>
> --
> 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 at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20130411/0056e62d/attachment-0001.htm
More information about the smokeping-users
mailing list