Update main.py
Do not need namespace in tags.
This commit is contained in:
parent
c54e30c200
commit
61d3405928
1 changed files with 1 additions and 3 deletions
4
main.py
4
main.py
|
@ -11,7 +11,7 @@ DB_PORT = int(os.getenv('INFLUX_DB_PORT', '8086'))
|
||||||
DB_USER = os.getenv('INFLUX_DB_USER', '')
|
DB_USER = os.getenv('INFLUX_DB_USER', '')
|
||||||
DB_PASSWORD = os.getenv('INFLUX_DB_PASSWORD', '')
|
DB_PASSWORD = os.getenv('INFLUX_DB_PASSWORD', '')
|
||||||
DB_DATABASE = os.getenv('INFLUX_DB_DATABASE', 'speedtests')
|
DB_DATABASE = os.getenv('INFLUX_DB_DATABASE', 'speedtests')
|
||||||
DB_TAGS = os.getenv('INFLUX_DB_TAGS', '')
|
DB_TAGS = os.getenv('INFLUX_DB_TAGS', None)
|
||||||
|
|
||||||
# Speedtest Settings
|
# Speedtest Settings
|
||||||
# Time between tests (in minutes, converts to seconds).
|
# Time between tests (in minutes, converts to seconds).
|
||||||
|
@ -49,7 +49,6 @@ def tag_selection(data):
|
||||||
return None
|
return None
|
||||||
# tag_switch takes in _data and attaches CLIoutput to more readable ids
|
# tag_switch takes in _data and attaches CLIoutput to more readable ids
|
||||||
tag_switch = {
|
tag_switch = {
|
||||||
'namespace': NAMESPACE,
|
|
||||||
'isp': data['isp'],
|
'isp': data['isp'],
|
||||||
'interface': data['interface']['name'],
|
'interface': data['interface']['name'],
|
||||||
'internal_ip': data['interface']['internalIp'],
|
'internal_ip': data['interface']['internalIp'],
|
||||||
|
@ -68,7 +67,6 @@ def tag_selection(data):
|
||||||
}
|
}
|
||||||
|
|
||||||
options = {}
|
options = {}
|
||||||
tags = 'namespace, ' + tags
|
|
||||||
tags = tags.split(',')
|
tags = tags.split(',')
|
||||||
for tag in tags:
|
for tag in tags:
|
||||||
# split the tag string, strip and add selected tags to {options} with corresponding tag_switch data
|
# split the tag string, strip and add selected tags to {options} with corresponding tag_switch data
|
||||||
|
|
Loading…
Reference in a new issue