Introduction

External validation will enable the historian to validate various properties of measurements upon creation or update against an external validation server.

Example of a validated measurement:

images/validation/validation_valid.png

Example of an invalid measurement:

images/validation/validation_invalid.png

Configuration

images/validation/validation_configuration.png

Activate external validation

Activate the switch to enable further configuration.

Validation severity

Warning: when selected the user will be presented with a warning when creating or updating a measurement with invalid settings. The user will still be able to create or update the measurement.

Error: when selected the user will be presented with an error when creating or updating a measurement with invalid settings. The user will have to correct the settings to be able to proceed.

Endpoints

Here you will have to enter a valid http(s) URL endpoint to which the historian server will present measurements for validation via a POST request with an application/json body as described here . You can add multiple endpoints. Measurements that are invalidated by an endpoint will be presented to the subsequent endpoint. A measurement will be regarded as valid if one endpoint validates it. If a measurement fails validation for all endpoints a warning or error will be presented to the user.

Creating a validation server

The historian server will present the measurements to the validation server by posting the following JSON format compatible with the historian bulk upload format:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
[
  {
    "UUID": "dad3f495-22b1-11ec-864a-81d3f45e479b",
    "Name": "Tank1.Temperature",
    "Description": "",
    "Datatype": "boolean",
    "Database": "historian",
    "Collector": "OPC-UA Staging",
    "Tags": {},
    "Status": "Active",
    "Settings": {
      "NodeID": "ns=1;s=Boolean_22",
      "CollectionType": "polled",
      "CollectionOffset": 0,
      "CollectionInterval": 5000
    }
  },
  {
    "UUID": "c54b4e3c-6f02-11ec-864a-81d3f45e479b",
    "Name": "Site1.Tank2.Temperature",
    "Description": "",
    "Datatype": "number",
    "Database": "historian",
    "Collector": "MODBUS",
    "Tags": {},
    "Status": "Active",
    "Settings": {
      "RegType": "Input Register",
      "ByteOrder": "Default",
      "CollectionType": "monitored",
      "ModbusDataType": "int32",
      "CollectionOffset": 0,
      "CollectionInterval": 2000,
      "Address": 1
    }
  }
]

Corresponding to the example request body, the following JSON message is expected for the response returned from the webhook:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
[
  {
    "UUID": "dad3f495-22b1-11ec-864a-81d3f45e479b",
    "Valid": false,
    "Error": "Should include site prefix"
  },
  {
    "UUID": "c54b4e3c-6f02-11ec-864a-81d3f45e479b",
    "Valid": true,
    "Error": null
  }
]