The WSO2 IoT Server is packaged with an analytics profile to handle device monitoring and analytics. The following section provides an alternative to using the analytics profile, and guides you through using WSO2 Data Analytics Server (WSO2 DAS) for analytics with the WSO2 IoT Server device management profile. This is useful in a production environment where a WSO2 DAS node is already in use and you want to use the WSO2 IoT Server device management profile with it.
Follow the steps below to configure WSO2 IoT Server with WSO2 DAS for analytics.
This option is only available for the WUM-updated WSO2 DAS 3.1.0 pack or a later version as it requires some fixes that are missing in the vanilla pack.
Update WSO2 DAS using WUM. For more information on how to do this, see Getting Started with WUM.
- Extract the WUM-updated DAS pack found in your WUM update repository. The unzipped file will be referred to as
<DAS_HOME>throughout this documentation.
Download the following feature installation pom file and place it inside the
<DAS_HOME>on the terminal and execute the following command. This will install the required features to the WSO2 IoT Server pack.
wso2server.shfile found in the
<DAS_HOME>/bindirectory and add the following environment variables to the end of the file. These environment variables are used as a global configuration to specify the IP addresses of the different entities (the message broker, device manager and key manager) that need to be connected.
Using WSO2 DAS for IoT analytics requires communication with different servers. To enable server-to-server communication, open the authenticators.xml file found in the <DAS_HOME>/repository/conf/security directory and add the SignedJWTAuthenticator inside the <Authenticators> tag.
Next, configure the input and output adapters that are used to handle the protocols required for collaboration between devices and WSO2 DAS, as well as between WSO2 DAS and WSO2 IoT Server.
input-event-adapters.xmlfile found in the
<DAS_HOME>/repository/confdirectory and add the following adapter configuration inside the
output-event-adapters.xmlfile found in the
<DAS_HOME>/confdirectory and add the following adapter configuration inside the
The default keystore used in WSO2 IoT Server has been updated from version 3.1.0 onwards. Since all servers must use the same certificate, do the following to update the keystore in WSO2 DAS.
- Navigate to the
<IOTS_HOME>/repository/resources/securityfolder and copy the
- Paste it in the
<DAS_HOME>/repository/resources/securityfolder and replace the existing
- Navigate to the
If you have changed the default port offset of the analytics profile from 2, do the following changes in the WSO2 IoT Server.
iotserver.shfile found in the
<IOT_HOME>/bindirectory and update the following environment variables to the relevant endpoints.
analytics-data-config.xmlfile found in the
<IOT_HOME>/conf/analyticsdirectory and point to the relevant DAS endpoint.
device-analytics-config.xmlfile found in the
<IOT_HOME>/conf/etcdirectory and update the receiver URL.
Use a port offset to start the WSO2 DAS server. For instance, you can run WSO2 DAS with
If you have changed the default port offset of the analytics profile from 2, use the updated port offset value to start the server accordingly.