[root@ecs-88f9 bin]# nohup njmon -s 5 | ./njmon2influx.py njmond.conf
nohup: ignoring input and redirecting stderr to stdout
{'njmon_port': 8181, 'njmond_host': 'localhost', 'njmon_secret': 'ignore', 'data_inject': False, 'data_json': True, 'directory': '/home/njmon/data', 'influx_host': 'localhost', 'influx_port': 8086, 'influx_user': 'admin', 'influx_password': 'admin', 'influx_dbname': 'njmon', 'batch': 100, 'workers': 10, 'debug': True, 'logging': True}
host=localhost port=8086 user=admin password=admin dbname=njmon
count=1 linesize=6 pushs=0 bytes=6 cached=0
Traceback (most recent call last):
File "./njmon2influx.py", line 240, in <module>
host = inject_snapshot(json.loads(line))
File "./njmon2influx.py", line 125, in inject_snapshot
timestamp = sample["timestamp"]["UTC"]
TypeError: 'int' object is not subscriptable
按照您的教程,在实际部署时出现这个问题,能帮忙处理下么?
相似问题