Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freebox-*-stations: fix [WARNING] munin_set_var_loc #41

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion freebox.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def authorize():
except requests.exceptions.SSLError:
print("KO for", root_ca)

if self.root_ca is '':
if self.root_ca == '':
print('Warning: using unsecure communication!')
self.protocol = 'http'
# re-compute URI using http
Expand Down
11 changes: 7 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ def print_config():
print('graph_args --lower-limit 0')
stations = get_wifi_stations()
for station in stations:
print('{}.label {}'.format(station, station))
print('{}.draw AREASTACK'.format(station))
station_safe = station.replace(" ", "_")
print('{}.label {}'.format(station_safe, station))
print('{}.draw AREASTACK'.format(station_safe))
elif mode == mode_wifi_bytes:
print('graph_title Wifi bytes up/down')
print('graph_scale yes')
Expand Down Expand Up @@ -411,7 +412,8 @@ def query_wifi_stations():
value = 1
else:
value = 0
print('{}.value {}'.format(station, value))
station_safe = station.replace(" ", "_")
print('{}.value {}'.format(station_safe, value))

def query_wifi_bytes():
data = freebox.api('wifi/ap/0/stations/')
Expand Down Expand Up @@ -498,7 +500,8 @@ def query_switch_stations(interface):
value = 1
else:
value = 0
print('{}.value {}'.format(station, value))
station_safe = station.replace(" ", "_")
print('{}.value {}'.format(station_safe, value))


def query_rrd_data():
Expand Down