mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-03 04:07:52 +00:00
Correct scriptname variable in csvtoinflux
Signed-off-by: Matthew Stidham <stidmatt@protonmail.com>
This commit is contained in:
@@ -44,10 +44,11 @@ class CSVtoInflux(Realm):
|
|||||||
self.df = df
|
self.df = df
|
||||||
|
|
||||||
# Submit data to the influx db if configured to do so.
|
# Submit data to the influx db if configured to do so.
|
||||||
def post_to_influx(self, kpi):
|
def post_to_influx(self):
|
||||||
dates = list(set(kpi['Date']))
|
dates = list(set(self.df['Date']))
|
||||||
|
scriptname=self.df['test-id'][0]
|
||||||
for date in dates:
|
for date in dates:
|
||||||
kpi2 = self.df[self.df['Date'] == date][['Date', 'test details', 'numeric-score']]
|
kpi2 = self.df[self.df['Date'] == date][['Date', 'test details', 'numeric-score','test-id']]
|
||||||
metrics = list(set(kpi2['test details']))
|
metrics = list(set(kpi2['test details']))
|
||||||
targets = dict()
|
targets = dict()
|
||||||
for k in metrics:
|
for k in metrics:
|
||||||
@@ -55,7 +56,7 @@ class CSVtoInflux(Realm):
|
|||||||
targets[k.replace(' ', '-').lower()] = targets.pop(k)
|
targets[k.replace(' ', '-').lower()] = targets.pop(k)
|
||||||
targets
|
targets
|
||||||
tags = dict()
|
tags = dict()
|
||||||
tags['script'] = 'WiFi Capacity'
|
tags['script'] = scriptname
|
||||||
for k in targets.keys():
|
for k in targets.keys():
|
||||||
self.influxdb.post_to_influx(k, targets[k], tags, date)
|
self.influxdb.post_to_influx(k, targets[k], tags, date)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user