License Usage Standalone Utility
search cancel

License Usage Standalone Utility

book

Article ID: 408776

calendar_today

Updated On:

Products

VMware Smart Assurance Network Observability

Issue/Introduction

  • The Smarts standalone License usage utility collects Device level information from Smarts Domain Managers, categorizes them under SNMP and Non-SNMP devices. The utility provides the daily license usage as well as the monthly and quarterly high watermarks.

  • This utility is for Smarts 10.1.X, DM 2.4, 24.3.10 and TCSA 2.4 DM deployments.

 

Note: For Smarts 24.3.13 and above, this utility is not needed as the feature is in-built in the product. The monthly and quarterly license usage details can be obtained using the API mentioned in "Smarts 24.3.13 and above" section.  

Environment

Smarts 24.3.13

Resolution

  • Pre-requisites

    • Download the file smarts-license-usage-standalone-24.3.13.tar.gz from the KB article to the Smarts Presentation SAM server.

    • Extract the contents outside of Smarts deployment directory and verify that the following files exist

      • smarts_license_usage_standalone-24.3.13.jar
      • config-24.3.13.properties
      • schedule_smarts_license_usage_standalone-24.3.13.sh
      • smarts_license_usage_standalone-24.3.13.osl
      • readme-24.3.13.txt

 

  • Configurations

         Open the config-24.3.13.properties file and update the parameters below according to your deployment.

    • Broker Settings:
      • smarts.broker.host: Broker IP address
      • smarts.broker.port: Broker Port number
      • smarts.broker.authentication.required: false by default, change it to “true” if broker authentication is configured.
      • smarts.broker.username: Uncomment and specify the broker username if the broker authentication is configured.
      • smarts.broker.password: Uncomment and specify the broker password if the broker authentication is configured.
    • Encryption:
      • useDefaultEncryptionKey: true by default, change to false if you want to use your own key for encryption.
      • EncryptionKey: 5–10-digit string used as a key for encrypting the Domain Manager and Broker Passwords.
    • Output Directory:
      • output.dir.path: “.” by default (directory where license utility is kept), change to the absolute directory path to store the license usage reports and the logs. Ensure to have read/write privileges to this directory.
    • Domain Managers:
      • If all domain managers are configured with same credentials:

                                smarts.domain[0].name=.*

                smarts.domain[0].username=<USERNAME> (e.g., smarts.domain[0].username=<Username>)

                smarts.domain[0].password=<PASSWORD> (e.g., smarts.domain[0].password=<password>)

      • If domain managers are configured with different credentials, then have multiple entries with an index starting from 0:

                smarts.domain[0].name=<DOMAIN-NAME> (e.g., smarts.domain[0].name=INCHARGE-AM-PM-1)

                smarts.domain[0].username=<USERNAME> (e.g., smarts.domain[0].username==<Username>))

                smarts.domain[0].password=<PASSWORD> (e.g., smarts.domain[0].password=<password>)

 

  •  Smarts 10.1.X, DM 2.4, 24.3.10 and TCSA DM 2.4 – Execution Steps

    • Scheduled Execution via Cron (Mandatory):

                  This utility should be scheduled as a cronjob to run every day.

      1. Navigate to the extracted directory (e.g., /opt)
      2. Run: 

                           ./schedule_smarts_license_usage_standalone-24.3.13.sh

                       3. Verify with: crontab -l

                  Note: Only for legacy smarts system as version mentioned above. It runs every midnight. Output, JSON and XML reports and logs in output.dir.path configured.

 

    • On-Demand (Optional):

                  There is an option to run the utility on-demand and below is the procedure to do so.

      1. Navigate to the extracted directory (e.g., /opt)

      2. Run:

        <SMARTS_JRE_HOME>/bin/java -jar smarts_license_usage_standalone-24.3.13.jar config-24.3.13.properties

        (e.g., /opt/InCharge/SAM/smarts/jre/bin/java -jar smarts_license_usage_standalone-24.3.13.jar config-24.3.13.properties)

      3. Check the output, JSON and XML reports and logs in output.dir.path configured.

                 Note: On the first run, passwords are encrypted automatically for security purposes.

 

  • Smarts 24.3.13 and above

         From Smarts version 24.3.13 onwards, license telemetry feature is in-built in the product. The below API provides license usage data for a selected period. It applies license weightage and returns the peak usage of the specific day observed on the month(s) and the quarter within that period.

         http://<SMARTS-TOMCAT-IP>:<PORT>/smarts-edaa/license/telemetry/v1/usageTelemetryRangeWeighted/<SAM_DOMAIN_MANAGER>?startDate=yyyy-MM-dd&endDate=yyyy-MM-dd

         Example Request: http://##.##.##.##:8080/smarts-edaa/license/telemetry/v1/usageTelemetryRangeWeighted/INCHARGE-SA-PRES?startDate=2025-06-01&endDate=2025-08-31

 

  • Upgrade to Smarts 24.3.13 and later

         If the Smarts standalone License usage utility is scheduled to run as a cronjob in earlier versions (below 24.3.13) then the below procedure needs to be followed to remove the cronjob entry.

         crontab -l | grep -v 'smarts_license_usage_standalone' | crontab -

Attachments

smarts_license_usage_standalone-24.3.13.tar.gz get_app