This commit is contained in:
Sean Corrigan 2021-11-05 12:28:34 -04:00
parent e888835662
commit 633682b6bf

View File

@ -58,8 +58,11 @@ def main():
## Pull whatever data we would like into a dict of each ups ## Pull whatever data we would like into a dict of each ups
for host in upslist: for host in upslist:
client = PyNUTClient(host, '3493') client = PyNUTClient(host, '3493')
for UPS in upslist[host]: try:
data[UPS] = client.list_vars(UPS) for UPS in upslist[host]:
data[UPS] = client.list_vars(UPS)
except:
print('UPS {} is having issues'.format(host))
uploadInflux(data) uploadInflux(data)