NMONVisualizer

json

Overview

NMONVisualizer can process JSON files, but they must be in the correct format. This format consists of 3 main objects: the metadata, the data type definitions and the actual data. These objects are defined as fields of the main JSON object, so they can be placed in the file in any order.

Metadata

The metadata section contains information about the JSON file being parsed. The following fields are required:

Two other fields are optional:

Note that whenPattern may include a time zone. If it does not and no timezone is specified, then the file will be parsed using the current timezone.

Data Types

This section defines the names and fields that will be used in the data section. A single array of objects, named types is used to define this data. Each array entry (type) is an object containing the following:

Optionally, a subtypes array can be specified to indicate that the data type has subbordinate types. This allows similar data to be grouped together in the GUI. For example, all disks will have the same fields, but each disk could be named and displayed separately. subtypes should be an array of strings.

Data

The data section contains the actual data. A single array named data contains all the values. Each element of the array contains all the data for a given time and contains the following fields:

If data for a particular (sub)type does not exist for a particular when value, it can be skipped; null or empty arrays should not be used. However, if data for a particular field does not exist but other fields are present at that time, null should be used as the value. This will be interpreted as Double.NaN by the GUI (i.e. a missing value).

Overview

Example

{ "hostname": "dummy.rtp.raleigh.ibm.com", "whenPattern": "MM/dd/yyyy HH:mm:ss", "metadata": { "mdata1": "value 1", "mdata2": "value 2", "mdata3": "completely arbitrary data goes here" }, "types": [ { "id": "type1", "name": "type 1", "fields": [ "field11", "field12", "field13" ] }, { "id": "type2", "name": "type 2", "fields": [ "field21", "field22", "field23" ] }, { "id": "type3", "name": "type 3", "fields" :[ "field31", "field32", "field33" ] }, { "id": "type4", "name": "type 4", "subtypes": [ "sub41", "sub42", "sub43"], "fields" :[ "field41", "field42", "field43" ] }, { "id": "type5", "name": "type 5", "subtypes": [ "sub51", "sub52", "sub53"], "fields" :[ "field51", "field52", "field53" ] } ], "data": [ { "when": "10/15/2012 10:00:00", "type1": [ 1, 2, 3 ], "type2": [ 4, 5, 6 ], "type3": [ 1, 2 , 3 ], "type4": { "sub41": [ 4, 5 , 6 ], "sub42": [ 6, 7 , 8 ], "sub43": [ 8, 9 , 10 ] }, "type5": { "sub51": [ 3, 2 , 1 ], "sub52": [ 4, 3 , 2 ], "sub53": [ 5, 4 , 3 ] } }, { "when": "10/15/2012 10:00:30", "type1": [ 2, 3 , 4 ], "type2": [ 5, 6 , 7 ], "type3": [ 1, 2 , 3 ], "type4": { "sub41": [ 4, 5 , 6 ], "sub42": [ 6, 7 , 8 ], "sub43": [ 8, 9 , 10 ] }, "type5": { "sub51": [ 3, 2 , 1 ], "sub52": [ 4, 3 , 2 ], "sub53": [ 5, 4 , 3 ] } }, { "when": "10/15/2012 10:01:00", "type1": [ 1, 2 , 3 ], "type2": [ 4, 5 , 6 ], "type3": [ 1, 2 , 3 ], "type4": { "sub41": [ 4, 5 , 6 ], "sub42": [ 6, 7 , 8 ], "sub43": [ 8, 9 , 10 ] }, "type5": { "sub51": [ 3, 2 , 1 ], "sub52": [ 4, 3 , 2 ], "sub53": [ 5, 4 , 3 ] } }, { "when": "10/15/2012 10:01:30", "type1": [ 2, 3 , 4 ], "type2": [ 5, 6 , 7 ], "type3": [ 1, 2 , 3 ], "type4": { "sub41": [ 4, 5 , 6 ], "sub42": [ 6, 7 , 8 ], "sub43": [ 8, 9 , 10 ] }, "type5": { "sub51": [ 3, 2 , 1 ], "sub52": [ 4, 3 , 2 ], "sub53": [ 5, 4 , 3 ] } }, { "when" : "10/15/2012 10:02:00", "type1": [ 1, 2 , 3 ], "type2": [ 4, 5 , 6 ], "type3": [ 1, 2 , 3 ], "type4": { "sub41": [ 4, 5 , 6 ], "sub42": [ 6, 7 , 8 ], "sub43": [ 8, 9 , 10 ] }, "type5": { "sub51": [ 3, 2 , 1 ], "sub52": [ 4, 3 , 2 ], "sub53": [ 5, 4 , 3 ] } } ] }