njmon2influx.py read njmon data error
Linux performance monitoring on-screen or to CSV file
Brought to you by:
nigelgriffiths
njmon -s 5 |python3 njmon2influx.py njmond.conf
Traceback (most recent call last):
File "/root/njmon-tools/njmon2influx.py", line 240, in <module>
host = inject_snapshot(json.loads(line))
File "/root/njmon-tools/njmon2influx.py", line 125, in inject_snapshot
timestamp = sample["timestamp"]["UTC"]
TypeError: 'int' object is not subscriptable
env: unbutu 22.10.
run the njmon, will echo the pid first, Causes script error.
add
fixed
Use the -n option with njmon.
This switches off the outputting of the process id, PID.
Thanks.