Skip to content

Commit 4f26573

Browse files
committed
Smokeping update
1 parent 2a1f360 commit 4f26573

File tree

6 files changed

+58
-10
lines changed

6 files changed

+58
-10
lines changed

roles/setup-smokeping/config/targets/reference-v4/REGIONS-4/AsiaEast.conf.j2

+12
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ host = lg.tok.hosthatch.com
3737
menu = [JP] Kuaichedao
3838
title = [JP] Kuaichedao @ Eons Data - Tokyo, Japan [jp-bgp.tyo.lg.kuaichedao.xyz]
3939
host = jp-bgp.tyo.lg.kuaichedao.xyz
40+
41+
++ leaseweb-jp
42+
menu = [JP] LeaseWeb
43+
title = [JP] LeaseWeb - Tokyo, Japan [mirror.jp.leaseweb.net]
44+
host = mirror.jp.leaseweb.net
4045
{% endif %}
4146

4247
++ linode-jp
@@ -170,7 +175,14 @@ host = mirror.hk.leaseweb.net
170175
menu = [HK] Misaka
171176
title = [HK] Misaka Network - Hong Kong, China [45.11.104.140]
172177
host = 45.11.104.140
178+
{% endif %}
173179

180+
++ orangevps-hk
181+
menu = [HK] OrangeVPS
182+
title = [HK] OrangeVPS @ HKBN - Hong Kong, China [hk-lg.orangevps.com]
183+
host = hk-lg.orangevps.com
184+
185+
{% if not smokeping_lite %}
174186
++ salmoncloud-hk
175187
menu = [HK] SalmonCloud
176188
title = [HK] SalmonCloud - Hong Kong, China [hkg.lg.salmoncloud.co.uk]

roles/setup-smokeping/config/targets/reference-v4/REGIONS-4/AsiaSouthCentral.conf.j2

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ menu = [SG] Onidel
4747
title = [SG] Onidel @ Host Universal - Singapore, Singapore [sg.lg.onidel.com]
4848
host = sg.lg.onidel.com
4949

50+
++ orangevps-sg
51+
menu = [SG] OrangeVPS
52+
title = [SG] OrangeVPS @ Epsilon Telecommunications - Singapore [sg-lg.orangevps.com]
53+
host = sg-lg.orangevps.com
54+
5055
++ ovh-sgp-0
5156
menu = [SG] OVH
5257
title = [SG] OVH - Singapore [sgp.proof.ovh.net]

roles/setup-smokeping/config/targets/reference-v4/REGIONS-4/EU.conf.j2

+10
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ host = lg.hostslim.nl
172172
menu = [NL] Hybula
173173
title = [NL] Hybula - Amsterdam, Netherlands [lg-nl-ams.hybula.net]
174174
host = lg-nl-ams.hybula.net
175+
176+
++ leaseweb-nl
177+
menu = [NL] LeaseWeb
178+
title = [NL] LeaseWeb - Amsterdam, Netherlands [mirror.nl.leaseweb.net]
179+
host = mirror.nl.leaseweb.net
175180
{% endif %}
176181

177182
++ liteserver
@@ -297,6 +302,11 @@ menu = [DE] IP-Projects (Frankfurt)
297302
title = [DE] IP-Projects - Frankfurt, Germany [lg.ip-projects.de]
298303
host = lg.ip-projects.de
299304

305+
++ leaseweb-de
306+
menu = [DE] LeaseWeb
307+
title = [DE] LeaseWeb - Frankfurt, Germany [mirror.de.leaseweb.net]
308+
host = mirror.de.leaseweb.net
309+
300310
++ linode-fra
301311
menu = [DE] Linode
302312
title = [DE] Linode - Frankfurt, Germany [speedtest.frankfurt.linode.com]

roles/setup-smokeping/config/targets/reference-v6/REGIONS-6/AsiaSouthCentral.conf.j2

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ menu = [SG] Linode
3030
title = [SG] Linode - Singapore [speedtest.singapore.linode.com]
3131
host = speedtest.singapore.linode.com
3232

33+
++ orangevps-sg
34+
menu = [SG] OrangeVPS
35+
title = [SG] OrangeVPS @ Epsilon Telecommunications - Singapore [2001:df4:c140:1f::e]
36+
host = 2001:df4:c140:1f::e
37+
3338
++ ovh-sgp-0
3439
menu = [SG] OVH
3540
title = [SG] OVH - Singapore [sgp.proof.ovh.net]

roles/setup-smokeping/config/targets/reference-v6/REGIONS-6/EU.conf.j2

+17-5
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,31 @@ host = 2a06:5b80:1::b67b:cd74
113113
menu = [NL] Hybula
114114
title = [NL] Hybula - Amsterdam, Netherlands [lg-nl-ams.hybula.net]
115115
host = lg-nl-ams.hybula.net
116+
117+
++ leaseweb-nl
118+
menu = [NL] LeaseWeb
119+
title = [NL] LeaseWeb - Amsterdam, Netherlands [mirror.nl.leaseweb.net]
120+
host = mirror.nl.leaseweb.net
116121
{% endif %}
117122

118123
++ liteserver
119124
menu = [NL] LiteServer
120125
title = [NL] LiteServer - Dronten, Netherlands [lg-drn.liteserver.nl]
121126
host = lg-drn.liteserver.nl
122127

123-
++ novoserve-nl
124-
menu = [NL] NovoServe
125-
title = [NL] NovoServe - Amsterdam, Netherlands [speedtest.novoserve.com]
126-
host = speedtest.novoserve.com
127-
128128
{% if not smokeping_lite %}
129129
++ mirhosting-ams
130130
menu = [NL] MIRHosting
131131
title = [NL] MIRHosting - Amsterdam, Netherlands [speedtest.nl3.mirhosting.net]
132132
host = speedtest.nl3.mirhosting.net
133+
{% endif %}
133134

135+
++ novoserve-nl
136+
menu = [NL] NovoServe
137+
title = [NL] NovoServe - Amsterdam, Netherlands [speedtest.novoserve.com]
138+
host = speedtest.novoserve.com
139+
140+
{% if not smokeping_lite %}
134141
++ psychz-nl
135142
menu = [NL] Psychz
136143
title = [NL] Psychz - Amsterdam, Netherlands [2604:6600:2007:48:0:2:185f:e237]
@@ -212,6 +219,11 @@ menu = [DE] IP-Projects (Frankfurt)
212219
title = [DE] IP-Projects - Frankfurt, Germany [lg.ip-projects.de]
213220
host = lg.ip-projects.de
214221

222+
++ leaseweb-de
223+
menu = [DE] LeaseWeb
224+
title = [DE] LeaseWeb - Frankfurt, Germany [mirror.de.leaseweb.net]
225+
host = mirror.de.leaseweb.net
226+
215227
++ linode-fra
216228
menu = [DE] Linode
217229
title = [DE] Linode - Frankfurt, Germany [speedtest.frankfurt.linode.com]

scripts/smokeping-add.py

+9-5
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@ def get_field(desc, prefilled=None):
9696
return prefilled
9797
return input(f'{desc}: ')
9898

99-
_COUNTRIES_SHOW_PROVINCE = {'CA', 'US'}
10099
def fmt_smokeping(entry_name, address, isp, country, province, city, levels=2):
101100
assert levels >= 0
102101
hdr = '+' * levels
@@ -112,19 +111,22 @@ def fmt_smokeping(entry_name, address, isp, country, province, city, levels=2):
112111
assert pycountry_entry
113112

114113
isp_short = isp.split('@')[0].strip()
115-
if country in _COUNTRIES_SHOW_PROVINCE:
114+
if country in ('CA', 'US'):
116115
print(f'menu = [{country}/{province}] {isp_short}')
116+
assert city
117117
loc = f'{city}, {province}, {country}'
118118
print(f'title = [{country}/{province}] {isp} - {loc} [{address}]')
119119
else:
120120
if country in ('HK', 'MO'):
121+
city = pycountry_entry.name
121122
country_display = 'China'
122123
elif country == 'RU':
123124
country_display = 'Russia'
124125
else:
125126
country_display = getattr(pycountry_country, 'common_name', pycountry_entry.name)
127+
126128
print(f'menu = [{country}] {isp_short}')
127-
loc = f'{city}, {country_display}'
129+
loc = f'{city}, {country_display}' if city else country_display
128130
print(f'title = [{country}] {isp} - {loc} [{address}]')
129131
print(f'host = {address}')
130132

@@ -154,9 +156,11 @@ def main():
154156
ipaddress.IPv6Address(ipv6)
155157
country = get_field('country code (XX)', args.country).upper()
156158
province = ''
157-
if country in {'CA', 'US'}:
159+
if country in ('CA', 'US'):
158160
province = get_field('state/province code (XX)', args.province) or ''
159-
city = get_field('city name (in full)', args.city)
161+
city = ''
162+
if country not in ('SG', 'HK', 'MO'):
163+
city = get_field('city name (in full)', args.city)
160164
entry_name = get_field('Smokeping entry name', args.name)
161165
isp = get_field('ISP / hosting provider', args.isp)
162166

0 commit comments

Comments
 (0)