Add failure message when a KPI is not found in a folder for GhostRequest

Automatic script to run influx, grafana, and ghost from wifi capacity and dataplane.

Minor fix in csv_to_influx for correcting missing values

Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
Matthew Stidham
2021-07-21 14:18:11 -07:00
parent fae9c2781a
commit 2828bd077b
3 changed files with 126 additions and 65 deletions

View File

@@ -57,8 +57,6 @@ class CSVtoInflux():
# Submit data to the influx db if configured to do so.
def post_to_influx(self):
df = self.read_csv(self.target_csv)
for row in df:
row =[sub.replace('NaN','0') for sub in row]
length = list(range(0, len(df[0])))
columns = dict(zip(df[0], length))
print('columns: %s' % columns)
@@ -68,6 +66,7 @@ class CSVtoInflux():
'dut-hw-version', 'dut-sw-version', 'dut-serial-num', 'test-rig', 'Units']
csv_vs_influx = dict(zip(csv_variables, influx_variables))
for row in df[1:]:
row = [sub.replace('NaN', '0') for sub in row]
tags = dict()
print("row: %s" % row)
short_description = row[columns['short-description']]