1. Introduction

This manual describes the configuration of the server-side components of the GBS SmartSense application. GBS SmartSense is an application designed to monitor GBDS Clusters, allowing the user to view live reports on the environment’s health and performance.

The configuration procedure should be done only after the installation step. For more information, refer to GBS Apps Setup Manual.

2. Configuration

The configurations steps are:

  1. Configure Tomcat;
  2. Configure Certificates;
  3. Generate encrypted password;
  4. Install the Elastic Stack (ELK);
  5. Configure the config.properties;

All steps are described below. An example config.properties file is found in the Configuration File Example section.

Danger

All lines must be present in the configuration file. Commenting or deleting lines may cause unexpected behavior. For further information, contact Griaule Support Team.

2.1. Tomcat Configuration

Edit the Tomcat configuration file to configure the certificates and port that the application will use.

vi /var/lib/tomcats/smart-sense/conf/server.xml

To change the port, look for Connector port=. This is the port for the backend operations.

2.2. Certificates Configuration

To enable SSL authentication, search for connector port= in the file /conf/server.xml.

There are two entries. The commented one is the configuration for SSL. Remove the comment delimiters <!-- and -->, and adjust these settings:

port="58194"
keystoreFile="/home/griaule/keystore"
keystorePass="password"
keyAlias="1"
clientAuth="true"
truststoreFile="/home/griaule/keystore"
truststorePass="password"

The parameter port should be the desired network port for the application.

Change the path of keystoreFile and truststoreFile to the proper values. Do the same for keystorePass and truststorePass.

The parameter clientAuth="true" will require authentication from server-side to client-side and from client-side to server-side. This means that the client will need to import the certificate in the browser to be able to access the application.

Warning

When clientAuth is set to true, the system administrator must provide the certificate.pfx file for the end-users.

2.3. Database password encryption

In the config.properties file, the jdbc.password parameter is an encrypted password. To generate the encrypted password, perform the following steps:

  1. Go to the following directory:

    cd /var/lib/tomcats/smart-sense/webapps/gbs-smart-sense-server/WEB-INF/lib
    
  2. Execute the command:

    java -cp gbs-common-db-<version>.jar com.griaule.commons.util.EncryptUtil <desiredPassword>
    
  3. The encrypted password will be displayed after the message: “Encrypted password is:”

Note

Store this encrypted password. It will be used in the next step.

2.4. Application properties file

To configure the application properties file, open with:

vi /var/lib/tomcats/smart-sense/conf/config.properties

The most important changes in this configuration file are the jdbc.url, jdbc.username, jdbc.password, gbds.url, smart-sense.ip, and smart-sense.port properties. Configure the parameters according to the environment.

The complete configuration file is shown in the Configuration File Example section.

Note

Remember to substitute the correct encrypted password generated in the Database password encryption section in the file.

3. Installing the Elastic Stack (ELK)

Move on to the ELK installation manual for detailed instructions on how to install and configure the Elastic Stack.

4. Finish Configuration

After all configuration steps are complete, go back to the GBS Apps Setup Manual - Configuration Section.

5. Configuration File Example

This section shows an example of the config.properties file.

# *********************************************************************
#
#         /$$$$$$  /$$      /$$  /$$$$$$  /$$$$$$$  /$$$$$$$$
#        /$$__  $$| $$$    /$$$ /$$__  $$| $$__  $$|__  $$__/
#       | $$  \__/| $$$$  /$$$$| $$  \ $$| $$  \ $$   | $$
#       |  $$$$$$ | $$ $$/$$ $$| $$$$$$$$| $$$$$$$/   | $$
#        \____  $$| $$  $$$| $$| $$__  $$| $$__  $$   | $$
#        /$$  \ $$| $$\  $ | $$| $$  | $$| $$  \ $$   | $$
#       |  $$$$$$/| $$ \/  | $$| $$  | $$| $$  | $$   | $$
#        \______/ |__/     |__/|__/  |__/|__/  |__/   |__/
#
#
#
#         /$$$$$$  /$$$$$$$$ /$$   /$$  /$$$$$$  /$$$$$$$$
#        /$$__  $$| $$_____/| $$$ | $$ /$$__  $$| $$_____/
#       | $$  \__/| $$      | $$$$| $$| $$  \__/| $$
#       |  $$$$$$ | $$$$$   | $$ $$ $$|  $$$$$$ | $$$$$
#        \____  $$| $$__/   | $$  $$$$ \____  $$| $$__/
#        /$$  \ $$| $$      | $$\  $$$ /$$  \ $$| $$
#       |  $$$$$$/| $$$$$$$$| $$ \  $$|  $$$$$$/| $$$$$$$$
#        \______/ |________/|__/  \__/ \______/ |________/
#
# *********************************************************************

# DATABASE (RDB)
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://172.16.0.177:3306/smartsense?useSSL=false
jdbc.username=griaule
jdbc.password=CDrt8vbewA2YAubPNOLZkw==
jdbc.dialect=org.hibernate.dialect.MySQLDialect
jdbc.showSql=false

# GBDS CONNECTION
gbds.url=http://172.16.0.177:8085
gbds.user=gbds.authenticate
gbds.key=Griaule.123
gbds.logLevel=INFO
gbds.timeout=300

# SMARTSENSE - GUI
smart-sense.ip=172.16.0.177
smart-sense.port=8126
smart-sense.protocol=http
locale=en_us

# SMARTSENSE - CONFIGURATION

fingerprint.useSDK=true
useLatentExtrator.fingerprint=true
useLatentExtrator.palmprint=false
image.convert.useJnbis=true
server.standalone.port=8085

gbds.smartSenseUser=smart_sense_server
sync.logLevel=INFO
same.user.simultaneous.login=false
notification.delay=5

poolingLoadBalancing.time=60
poolingLoadBalancing.active=true
poolingLoadBalancing.last=

# SMARTSENSE - ELK CONFIGURATION

linkEnroll=http://172.16.0.177:5601/app/kibana#/dashboard/c7ba3d80-5148-11ed-bd96-63c5b972c3f4?embed=true&_g=(refreshInterval%3A(pause%3A!f%2Cvalue%3A60000)%2Ctime%3A(from%3Anow%2FM%2Cmode%3Aquick%2Cto%3Anow%2FM))
linkIdentify=http://172.16.0.177:5601/app/kibana#/dashboard/ea697bc0-4fe5-11ed-bd96-63c5b972c3f4?embed=true&_g=(refreshInterval%3A(pause%3A!f%2Cvalue%3A60000)%2Ctime%3A(from%3Anow%2FM%2Cmode%3Aquick%2Cto%3Anow%2FM))
linkIdentifyLatent=http://172.16.0.177:5601/app/kibana#/dashboard/6a4724a0-5469-11ed-bd96-63c5b972c3f4?embed=true&_g=(refreshInterval%3A(pause%3A!f%2Cvalue%3A60000)%2Ctime%3A(from%3Anow%2FM%2Cmode%3Aquick%2Cto%3Anow%2FM))
linkUpdate=http://172.16.0.177:5601/app/kibana#/dashboard/47eaf340-546a-11ed-bd96-63c5b972c3f4?embed=true&_g=(refreshInterval%3A(pause%3A!f%2Cvalue%3A60000)%2Ctime%3A(from%3Anow%2FM%2Cmode%3Aquick%2Cto%3Anow%2FM))
linkVerify=http://172.16.0.177:5601/app/kibana#/dashboard/2a2dd4b0-50b6-11ed-bd96-63c5b972c3f4?embed=true&_g=(refreshInterval%3A(pause%3A!f%2Cvalue%3A60000)%2Ctime%3A(from%3Anow%2FM%2Cmode%3Aquick%2Cto%3Anow%2FM))

consumerQueue.active=true