By popular demand, I have been busy working on this in the background.
As you know nmon is not my day job.
First, is a tool to take an nmon output file (.nmon which is a Comma Separated Value text file) and convert it into JSON format. JSON is the preferred format for many "new age" web 2.0 tools to ingest into a database and/or support dynamic graphing of the stats. JSON is a simple format but there are options for grouping stats.
I would like your comments on that and what is the best fit for you and your favourite tools.
Simple all at one level:
. . .
Or grouped together
. . .
nmon2json: New Flash 14th Dec 2017
This was released today at the below website. You will find there the nmon2json Ksh script and sample output files for both formats (single level and multiple level JSON) and from the output from originating from both AIX and Linux.
- The single level output option is now the default - I am told this is the way Splunk, ELK and Logstash like the data.
- Also find the Python program as an example on how to read JSON data files and extract the stats from the nmon2json script.
Limitations in the first release:
- Only does totals for Network I/O (just total KB/ per second and packets per seconds) - not individual network interfaces
- Only does totals for Disk I/O (just totals for read and write KB per second and xfers per second) - not individual disks
- Does not handle Top process stats - as its complicated and processes are transitory which makes parsing the JSON very hard.
- Can only be used on finished nmon files as it takes multiple passes due to the config data in the "info" section.
- This means you can't parse the live output from nmon (for example via a pipe or FIFO) for live stats collection.
- It turns out nmon for AIX can't be streamed to a pip or FIFO command - it reports the file exists already and stops.
njmon for Linux and njmon for AIX
Second, is a new tool that extracts the performance stats like nmon but then generates JSON data directly.
This has now been released as open source. You can find it here njmon for Linux and AIX (nmon but saving JSON format stats
It includes near real-time injection in to Splunk and InfluxDB/Grafana
Cheers, Nigel Griffiths