Overview
The Business Intelligence Service introduces the ability to trigger alarms raised by it's integrations and generic interface to groups that are within a target radius of the group's geolocation. Alarm trigger radii can be adjusted on a per alarm type basis.
Prerequisites
In order to use the NC4 Business Intelligence Integration, you must have the the following packages installed:
- SureView-DS - version 1.3 or above.
- SureView-UI - version 1.3 or above.
- SureView-DB - version 1.3 or above.
This service goes on Device Tier as an Alarm Receiver, but requires IIS and additional features not normally installed on the separate Device Tier server:
- Windows Features installed:
- NET Framework v4.6.2 (or newer)
- HTTP Activation
- IIS, with sub-features of:
- Common
- Default Document
- Static Content
- Application Development
- ASP.NET v4.x
- Common
- NET Framework v4.6.2 (or newer)
- .NET Core IIS hosting bundle (latest 2.1.x bundle) installed (note: must be installed after IIS and an "iisreset" must be performed afterwards to apply the changes)
- UrlRewrite installed (for HTTPS redirection)
Installation
Firstly ensure you are on the latest version of the Database. Then using Setup, install the latest version of the "Business Intelligence Service" module.
Geocoding
In order for the service to determine whether or not alarms have occurred within the trigger radius of a given group it will attempt to use the group's LatLong
value. If this is null
then the service will use the Google API to get the group's latlong (which is a string value representing the latitude value and longitude value separated by a space. eg "12.65452 32.68923") using it's address. Once this is found the group's latlong will be populated with that value to save time in future queries.
The service will use Google API Key (id 166) from the Prefs table if it exists, otherwise it will fallback to a hardcoded key.
Proxy Settings
If a proxy is being used then the address and credentials can be set in the config with the following keys in appsettings:
Key | Description |
---|---|
ProxyAddress | The address of the proxy server |
ProxyUsername | The username credential to use |
ProxyPassword | The password credential to use |
"ProxySettings": {
"ProxyAddress": "address",
"ProxyUsername": "username",
"ProxyPassword": "password"
}
Authentication / Authorisation
If the following section
"Authentication": {
"User": "encUser",
"Password": "encPword"
}
is present in the appsettings then it is expected the request will have an 'Authorization' header which will contain the basic <space> <base64encodedUserAndPassword>
or just <base64encodedUserAndPassword>
.
The user and password must be separated by a colon ':'
The decoded user and password passed in the header must match the user and password in the appsettings otherwise the request is rejected with a 401 Unauthorized response
Setting the Trigger Radius
The radius that the service will look within for sites to trigger an event in is set in the database. The table is dbo.DistanceConfiguration. The unit of measurement for the radius is in meters. If no sites are within the radius listed in the database, no event will be generated.
If the radius is changed, an IISREST is required to clear the old value from the application pool cache and for the new value to take affect.
Emitting alarms to nearest group only
If needed the behavior of the Business Intelligence Service can be modified so that alarms are only triggered for the nearest group within a trigger radius, instead of all of trigger events for all sites within the radius. To do so add the following setting in appsettings.json.
,"OnlyTriggerAlarmsForNearestGroup": true
Integrations
The service is capable of handling incoming alarms on it's own through it's generic interface. It can however listen out for vendor specific alarms in various formats and protocols, then convert them to SureView alarms through integrations, which are then forward them to the service where they are processed and are triggered if they within the trigger radius.
Here's the current list of Business Intelligence Service Integrations:
Comments
0 comments
Please sign in to leave a comment.