Create a JSON events file
- Last UpdatedAug 16, 2022
- 2 minute read
Events can be uploaded to AVEVA Insight in a JSON file.
To create a JSON events file
-
Open a text editor.
-
Create a file using the following format:
{
"events": [
{
"id": "<value>",
"eventtime": "<value>",
"type": "<value>",
"comment": "<value>",
"eventtimeutcoffsetmins": <value>,
"intouchtype": "<value>",
"isalarm": <value>,
"location": "<value>",
"priority": <value>,
"provider_applicationname": "<value>",
"provider_nodename": "<value>",
"provider_system": "<value>",
"provider_systemversion": "<value>",
"severity": <value>,
"source_area": "<value>",
"source_name": "<value>",
"source_hierarchicalarea": "<value>",
"source_hierarchicalobject": "<value>",
"source_object": "<value>",
"source_processvariable": "<value>",
"valuestring": "<value>",
"previousvaluestring": "<value>",
},
]
}
For more information on these parameters, see Events.
-
For each field in the record, replace <value> with the required value. Note that to successfully upload an event, the fields id, eventtime, and type must be provided.
-
For each subsequent record, copy the lines for the record -- from "{" to "}", inclusive -- and paste them below the first record. Edit the field values for each record.
-
Save the file as a JSON file.
Example JSON data file
This JSON file imports two records.
{
"events": [
{
"id": "8992b09c-ffd8-4e72-b712-070724c83dfb",
"eventtime": "2020-09-29T15:09:23.481Z",
"type": "Application.Write",
"comment": "Application Write Event on Value change",
"eventtimeutcoffsetmins": -420,
"intouchtype": "LGC",
"isalarm": false,
"location": "/",
"priority": 500,
"provider_applicationname": "CSVJsonUploaderApplication",
"provider_nodename": "JsonEventUploaderNode",
"provider_system": "Application Server",
"provider_systemversion": "6100.1210.3946.1",
"severity": 2,
"source_area": "Plant_Area",
"source_name": "ExampleSource",
"source_hierarchicalarea": "Plant_Area",
"source_hierarchicalobject": "Plant_Area",
"source_object": "Plant_Area",
"source_processvariable": "Reactor3.Level",
"valuestring": "200",
"previousvaluestring": "100",
},
{
"id": "91ed1832-be7c-48f1-8501-8355fc0446a0",
"eventtime": "2020-09-29T16:09:23.481Z",
"type": "Alarm.Set",
"alarm_acknowledged": false,
"alarm_class": "VALUE",
"alarm_condition": "Limit.HiHi",
"alarm_id": "91ed1832-be7c-48f1-8501-8355fc0446a0",
"alarm_inalarm": true,
"alarm_isshelved": false,
"alarm_issilenced": false,
"alarm_limitstring": "800",
"alarm_originationtime": "2020-09-29T16:09:23.481Z",
"alarm_state": "UNACK_ALM",
"alarm_tagtype": "S",
"alarm_type": "HiHi",
"comment": "Write event and alarms",
"eventtimeutcoffsetmins": -420,
"intouchtype": "HiHi",
"isalarm": true,
"location": "/",
"priority": 1,
"provider_applicationname": "CSVJsonUploaderApplication",
"provider_nodename": "JsonEventUploaderNode",
"provider_system": "Application Server",
"provider_systemversion": "6100.1210.3946.1",
"severity": 1,
"source_area": "Plant_Area",
"source_conditionvariable": "Reactor3.Level.HiHi",
"source_hierarchicalarea": "Plant_Area",
"source_hierarchicalobject": "Motor",
"source_object": "ExampleSource",
"source_name": "ExampleSource",
"source_processvariable": "Reactor3.Level",
"valuestring": "1000"
},
]
}