Managing the Smart Hub


You can perform the following tasks to manage the Smart Hub:

  • Customize the Smart Hub parameters
  • NEW IN 20.02.01 Customize the Smart Hub Gateway parameters
  • Start and stop the Smart Hub and Smart Hub Gateway
  • Troubleshoot issues with the Smart Hub

To customize the Smart Hub parameters

You can edit the Smart Hub configuration file to customize the Smart Hub parameters, such as the settings related to log file and server certificates.

Do the following:

  1. Log in to the host computer where the Smart Hub is installed.
  2. Navigate to the following path: 
    • (Windows) <installation_directory>\Smart Hub\config
    • (Linux) <installation_directory>/Smart Hub/config
  3. Back up the config.json file.
  4. In a text editor, open the config.json file and modify values of the parameters that you want to update.

    Field

    Purpose

    Default value

    port

    The web service listening port.

    443

    logFilePrefix

    The prefix to be used for log files.

    smarthub

    logLevel

    The log level.

    Info

    logFileSize

    The max size of a single log file in bytes.

    10000000

    numberOfLogFiles

    The number of log files to be preserved.

    5

    requestEntitySize

    The maximum size (in MB) of an HTTP request entity.

    100

    elasticCacheAddress

    The address of the Redis Cache cluster.

    localhost

    elasticCachePort

    The Redis Cache service port.

    6379

    numberOfAccessLogFiles

    The number of access log files.

    10

    accessLogFileSize

    The max size (in bytes) of a single access log file.

    10000000

    cleanupExpiredRequestsSchedule

    The number of expired requests to be cleaned up from the Smart Hub.

    300 (Daily at 12:30 AM)

    stateChangeManagementSchedule

    The interval at which the state of Smart Agent is calculated.

    5 minutes

    privateKeyFile

    The private key of the CA used to sign certificates for the Agent and Application Server.

    Generated at run time

    certificateKeyFile

    The server certificate key file for the Smart Hub.

    Generated at run time

    certificateFile

    The server certificate for the Smart Hub.

    Generated at run time

    caCertificateFile

    The CA-signed certificate file.

    Generated at run time

    sharedSecretKey

    The shared secret key specified during installation. It is used to validate certificate requests from the clients.


    certificateValidityDays

    The default expiry period in days for certificates that are generated by the Smart Hub.

    1095

    expiryTimeInHrs

    The default expiry time for data records stored in the database.

    24

    stateChangeCompCycles

    This parameter manages the state change event generation for the Smart Agent.

    3

    NEW IN 20.02.01 The Smart Hub also supports websockets. When a websocket request is made to the Smart Hub, a websocket channel is established between the Smart Hub and Smart Agents. The channel is used for communication between the Smart Hub and Smart Agents.

    Field

    Purpose

    Default Value

    logTime

    Local or UTC time in the logs.

    local

    nodejsWorkerThreadPoolSize

    Thread pool size for nodejs workers.

    4

    secureProtocol

    Security protocol.

    TLSv1.2

    enabledCipherSuites

    Enabled cipher suites

    TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA,SSL_RSA_WITH_
    3DES_EDE_CBC_SHA

    webSockets.maxConnections

    Maximum number of web socket connections that are allowed at a time.

    5000

    webSockets.concurrency

    Maximum number of connections that can actively transfer data at an instance.

    5000

    webSockets. pushTaskTimeoutInSec

    Time (in seconds) after which the work request push task is cancelled. 0 value indicates that the task will not be cancelled.

    0

    webSockets. maxPushTaskTimeoutInSec

    Global setting which limits the maximum time for which a work request push task is valid. In case some task is stuck in processing and never executes its callback, it is cancelled forcefully after this timeout. (0 -> Infinite)

    0

    webSockets. pushTaskIntervalInSec

    Time interval (in seconds) to periodically fetch data and push requests to the web socket client.

    5

    webSockets. pingIntervalInSec

    Time interval (in seconds) to send PING frames to the connected web socket clients.

    300

    webSockets. pongTimeoutInSec

    Time (in seconds) for which a PONG frame waits for the corresponding PING frame. After a PONG frame is timed out, the client web socket connection is disabled, and the push task is cancelled.

    60

  5. Save the changes.
  6. Restart the Smart Hub services.
    • (Windows
      1. On the search bar, type services.msc.
      2. Right click the Smart Hub service name, and click Restart.
        • TrueSight Server Automation Smart Hub
        • TrueSight Server Automation Smart Hub Redis (Displayed only when the Redis Server packaged with the Smart Hub is used.)
    • (Linux) Run the following command:
      systemctl restart smarthub

To customize the Smart Hub Gateway parameters

Do the following:

  1. Log in to the host computer where the Smart Hub is installed.
  2. Navigate to the following path: 
    • (Windows<installation_directory>\conf
    • (Linux) /<installation_directory>/conf
  3. Back up the application.properties file.
  4. In a text editor, open the application.properties file and modify the parameter values.

    Field

    Purpose

    Default value

    idleConnectionTimeout

    Idle connection timeout (in minutes) for the established tunnel connection.

    60

    tunnelWorkResponseTimeout

    Waiting time (in minutes) for a Tunnel Work Request response before marking the request as timed out.

    2

    cleanupActivityTimeInterval

    Interval (in minutes) between two clean up cycles that are used to clean timed out requests.

    1

    httpClientConnectionTimeout

    HTTP client connection timeout (in minutes).

    1

    httpClientReadTimeout

    HTTP client read timeout (in minute).

    1

    secureProtocol

    Security protocol.

    TLSv1.2

    enabledCipherSuites

    The cipher suits that are enabled.

    TLS_RSA_WITH_AES_256_CBC_SHA256, TLS_RSA_WITH_AES_256_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA

    clientRequestsHandlerThreadpoolSize

    Client requests handler thread pool size.

    2000

    smarthubGatewayPort

    The listening port of the Smart Hub Gateway.

    1080

    smarthubHost

    Hostname/IP of the server where Smart Hub is installed.

    localhost

    smarthubPort

    The listening port of the Smart Hub.

    443

    sharedSecretKey

    The Shared Secret Key of the Smart Hub.


  5. Save the changes.
  6. Restart the Smart Hub Gateway service:
    • (Windows
      1. On the search bar, type services.msc.
      2. Right click the Smart Hub Gateway service name, and click Restart.
    • (Linux) Run the following command:
      systemctl restart smarthub.service

To start and stop the Smart Hub

The Smart Hub runs as a daemon process. You can start and stop the Smart Hub as follows:

  • (Windows) Open the Windows services and start or stop the following service:
    TrueSight Server Automation Smart Hub Service
  • (Linux) Use these systemctl commands:
    • systemctl start smarthub.service
    • systemctl stop smarthub.service

To start and stop the Smart Hub Gateway NEW IN 20.02.01

Do the following to start or stop the Smart Hub Gateway:

  • (Windows) Open the Windows services and start or stop the following service:
    TrueSight Server Automation Smart Hub Gateway Service
  • (Linux) Use these systemctl commands:
    • systemctl start smarthub.gateway.service
    • systemctl stop smarthub.gateway.service

To troubleshoot issues with the Smart Hub

If you encounter any issues with the Smart Hub, check the Smart Hub logs to troubleshoot the issues. For more information, see Logs-for-the-Smart-Hub.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*