In our previous blog, we have already discussed the real life uses of SAS® Event Stream Processing Studio and connectivity between SAS® ESP Studio and OPC UA Server.
Now in this blog we discuss the Configuration of SAS® ESP Streamviewer. Keep reading to learn more about SAS® ESP Studio and Streamviewer.
What is SAS® ESP Streamviewer?
Streamviewer provides a user interface that enables us to subscribe to window event streams from one or more event stream processing engines and to display the events that stream through it. We can display each event as a row in a table or as an element of a graph. Each table row is keyed by the schema key of the corresponding window. We can save and load a collection of tables and graphs and their customized settings in dashboards.
Streamviewer dashboards are stored in a configuration database. For the configuration database storage mechanism, we can use one of several supported enterprise databases or the stand-alone, file-based H2 database that is provided with SAS® Event Stream Processing. After we have configured our storage mechanism, we can run the Streamviewer user interface.
Setting Up SAS® ESP Streamviewer:
We will be configuring the Streamviewer in Linux Environment and with default H2 database.
Following are the steps for implementation –
Step 1: Setting up the Environment Variables
Set the environment variables “DFESP_HOME” and “LD_LIBRARY_PATH”.If the variables are already set then move to the next step otherwise set the variables as follows on Linux Command Line:
Figure 1: Setting up the environment variables
Step 2: Moving the Streamviewer JAR package
Streamviewer is packaged in the streamviewer-4.3.jar file, which is located in the /lib directory of your ESP installation ($DFESP_HOME/lib). SAS recommends that you run the JAR file from another location.
We need to include the following script which is used to start Streamviewer:
So to move the JAR package and above mention script:
- Create the separate directory at different location.
- Copy the above mentioned JAR package and shell script to the newly created directory.
Note:Streamviewer requires a Java Virtual Machine (JVM) of 1.7 or later.
Step 3: Executing command to run the Streamviewer
To run the Streamviewer we need run the command on Linux terminal.
- Navigate to the directory which we created in above step.
- Run the following command:
streamviewer.sh -product h2 -http 5570 -h2file ./config -jar streamviewer-5.1.jar –noauth
- You can specify any available port number for the “-http” argument.
- After running the above command we can see the output on terminal as shown in following screenshot:
Figure 2: Executing the command to run the Stremviewer
We can use following additional arguments, depending on the we are using:
Figure 3: Additional Arguments for Streamviewer
Step 4: Accessing the Streamviewer URL
After Streamviewer is successfully started,
- Go to the web browser on local system.
- Enter the Streamviewer URL as follows:
- Replace <hostname> with the host name of the server where the Streamviewer files are installed and running.
- Replace <http_port> with the port number provided with the launch of the Streamviewer script.
- Streamviewer loads the ESP Model Viewer page.
Figure 4: Loading ESP Streamviewer Figure 5: ESP Streamviewer Main Screen Figure 6: ESP Model Viewer Page
SAS® Event Stream Processing 4.3: Visualizing Event Streams with Streamviewer