I have a server that runs smokeping to monitor a customer's WAN. The customer's smokeping page is password-protected by a simple .htpasswd authentication in Apache.
We have another customer that wants a similar network set up. We are pleased with smokeping and would like to deploy it again, and have smokeping maintain the viewable statistics under a separate URL that will also be password protected, so that one customer cannot view the other's network latency stats. Do I need to run a separate instance of smokeping for each customer to do this? Or can I just create a config file which lists the first customer's general parameters, alerts, and targets, followed by the second customer's general parameters, alerts, and targets, followed by a third, etc. >From the little bit of poking around I've done to look at how smokeping stores things under $datadir, it appears that if we can keep everything in one config file, then we will have to take care that the top-level target group names are unique for each customer, such as the "+ ABC_WAN_sites" and "+ ABC_WAN_sites" in the example below. Duplication of host names, as shown by use of curly, larry, and moe, would be allowed, because they are stored heirarchically under the top-level ABC_WAN or XYZ_WAN directory. True? Are there other gotchas that must be kept unique in the single- instance model? And if we have to do it the hard way, with multiple instances, is there any mechanism built in to smokeping to facilitate this, or will I have to patch some/all of the perl/cgi scripts? Any pointers as to which config file variables must be instantiated to avoid having the smokeping instances trip over each other's files? Thank you very much, Tobi, and others. Regards, Jim *** BEGIN CUSTOMER ABC *** *** General *** owner = My Name Here contact = [EMAIL PROTECTED] mailhost = localhost sendmail = /usr/sbin/sendmail imgcache = /usr/local/smokeping/htdocs/img imgurl = /abc/wan/smokeimg datadir = /usr/local/var/smokeping piddir = /usr/local/var/smokeping cgiurl = http://www.example.com/abc/wan/smokeping/smokeping.cgi smokemail = /usr/local/etc/smokeping/smokemail tmail = /usr/local/etc/smokeping/tmail # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process # disable this to revert to the old behaviour # concurrentprobes = no *** Alerts *** to = [EMAIL PROTECTED] from = [EMAIL PROTECTED] +bigloss type = loss # in percent pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0% comment = suddenly there is packet loss +someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row +startloss type = loss # in percent pattern = ==S,>0%,>0%,>0% comment = loss at startup +rttdetect type = rtt # in milli seconds pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100 comment = routing mesed up again ? *** Database *** step = 300 pings = 20 # consfn mrhb steps total AVERAGE 0.5 1 1008 AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320 AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720 *** Presentation *** template = /usr/local/etc/smokeping/basepage.html + overview width = 600 height = 50 range = 10h + detail width = 600 height = 200 unison_tolerance = 2 "Last 3 Hours" 3h "Last 30 Hours" 30h "Last 10 Days" 10d "Last 30 Days" 30d "Last 400 Days" 400d *** Probes *** + FPing binary = /usr/local/sbin/fping *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Please choose one of the target categories on the left. + ABC_WAN_sites menu = ABC WAN title = Hosts on the ABC WAN ++ curly host = curly.example.com ++ larry host = larry.example.com ++ moe host = moe.example.com *** BEGIN CUSTOMER XYZ *** *** General *** owner = My Name Here contact = [EMAIL PROTECTED] mailhost = localhost sendmail = /usr/sbin/sendmail imgcache = /usr/local/smokeping/htdocs/img imgurl = /xyz/wan/smokeimg datadir = /usr/local/var/smokeping piddir = /usr/local/var/smokeping cgiurl = http://www.example.com/xyz/wan/smokeping/smokeping.cgi smokemail = /usr/local/etc/smokeping/smokemail tmail = /usr/local/etc/smokeping/tmail # specify this to get syslog logging syslogfacility = local0 # each probe is now run in its own process # disable this to revert to the old behaviour # concurrentprobes = no *** Alerts *** to = [EMAIL PROTECTED] from = [EMAIL PROTECTED] +bigloss type = loss # in percent pattern = ==0%,==0%,==0%,==0%,>0%,>0%,>0% comment = suddenly there is packet loss +someloss type = loss # in percent pattern = >0%,*12*,>0%,*12*,>0% comment = loss 3 times in a row +startloss type = loss # in percent pattern = ==S,>0%,>0%,>0% comment = loss at startup +rttdetect type = rtt # in milli seconds pattern = <10,<10,<10,<10,<10,<100,>100,>100,>100 comment = routing mesed up again ? *** Database *** step = 300 pings = 20 # consfn mrhb steps total AVERAGE 0.5 1 1008 AVERAGE 0.5 12 4320 MIN 0.5 12 4320 MAX 0.5 12 4320 AVERAGE 0.5 144 720 MAX 0.5 144 720 MIN 0.5 144 720 *** Presentation *** template = /usr/local/etc/smokeping/basepage.html + overview width = 600 height = 50 range = 10h + detail width = 600 height = 200 unison_tolerance = 2 "Last 3 Hours" 3h "Last 30 Hours" 30h "Last 10 Days" 10d "Last 30 Days" 30d "Last 400 Days" 400d *** Probes *** + FPing binary = /usr/local/sbin/fping *** Targets *** probe = FPing menu = Top title = Network Latency Grapher remark = Please choose one of the target categories on the left. + XYZ_WAN_sites menu = XYZ WAN title = Hosts on the ABC WAN ++ curly host = curly.example.com ++ larry host = larry.example.com ++ moe host = moe.example.com _______________________________________________ smokeping-users mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
