Using the Dynamic Application Builder

Download this manual as a PDF file


This section describes how to create Dynamic Applications locally using the Dynamic Application Builder tool.

The Dynamic Application Builder is a tool that provides a creation wizard for Dynamic Applications that use the Snippet Framework libraries. For more information, see the Snippet Framework documentation.

The Dynamic Application Builder includes the ability to interface with your SL1 system to create PowerPack-able objects programmatically.

The Dynamic Application Builder is part of the SL1 Studio suite of tools. For more information, see https://support.sciencelogic.com/s/sl1-studio.

The Dynamic Application Builder works against endpoints with basic auth or no auth. Oauth2 will be supported in a future version.

Use the Dynamic Application Builder tool with caution, as you can overload your SL1 system with added collections created using the Dynamic Application Builder.

Validated Environments

Operating System Docker Desktop Docker CE + Docker Compose
Windows 10 X  
Windows 11 X  
OSX X  
Ubuntu WSL 2 X* X**
Ubuntu (Debian-based Distros) X X

* - Installed on the host operating system.

** - Installed locally to the guest operating system.

Configurations outside of those listed above have not been validated as of this release.

Prerequisites

You must have the following prerequisites to use the Dynamic Application Builder:

  • An SL1 system version 11.3.0 or later if you are exporting Dynamic Applications.
  • Version 101 of the "Low-code Tools" PowerPack installed on the SL1 system you wish to export Dynamic Applications to, as the Dynamic Application Builder builds Dynamic Applications using this low-code tool. Version 101 has been included in the .zip file. Refer to the Low-code Tools documentation to make any changes in SL1 after using the Dynamic Application Builder.
  • You must have Docker Desktop installed on your system.
  • At least 250 MB of free space on your system.

Installing and Launching the Dynamic Application Builder

To install the Dynamic Application Builder:

  1. Download the Dynamic Application Builder .zip file from the ScienceLogic Support Site to a local computer.

Installation or Upgrade Process for Windows

  1. Click to run the file marked "DynamicApplicationBuilder-1.2.0.exe".

  2. The installer will place a file named "Dynamic Application Builder" in the Applications menu (Start > Applications > Dynamic Application Builder).

  3. If you upgraded from an old version, uninstall the old version of the Dynamic Application Builder from Programs and Features (Control Panel > Programs > Programs and Features)

  4. Click the "Sciencelogic Dynamic Application Builder" file in the Applications menu (Start > Applications > Dynamic Application Builder) to run the application.

Installation or Upgrade Process for OSX

  1. Click to run the file marked "DynamicApplicationBuilder-1.2.dmg".
  2. In the window that appears, drag the file into the Applications folder.

  3. If you are upgrading from an older version, click Replace in the modal that appears.

  4. Open the Applications folder and locate the Dynamic Application Builder.

  5. Click to open the Dynamic Application Builder.

Using the Dynamic Application Builder

After installing the Dynamic Application Builder, you will go through each step of the wizard to create a credential, create a Dynamic Application, create collection objects, and export the Dynamic Application to SL1.

Creating a Credential

After launching the Dynamic Application Builder, it will detect any previously created endpoint credentials saved on your machine. It will give you the option to select those credentials or to create a new credential.

To add a new credential:

  1. Select either the HTTP or SSH tab to define the credential type you want to use.

Creating an HTTP Credential

  1. Complete the following fields:

    • Credential Name. Enter a way to identify the credential.

    • Hostname. Enter the full URL for the API you want to access.

    • Username. Enter a valid username for the API you want to access.

    • Password. Enter a valid password for the API you want to access.

    The Username and Password fields are not required. You should only populate these fields if authentication is required. Otherwise, leave them blank.

  2. If you want to add a Request Header to the credential, enter a Header Key and Header Value. Then click the Add Header button.

  3. Click the Save Credential button.

  4. Select the credential that you want to use and click the Continue button at the bottom of the page.

To delete a credential that is no longer needed, click the trashcan icon next to the credential you want to delete.

Creating an SSH Credential

  1. Complete the following fields:

    • SSH Credential Name. Enter a way to identify the credential.

    • Hostname or IP. Enter the Hostname or IP address of the device from which you want to retrieve data. This field is required.

    • Username. Enter the username for an SSH or user account on the device to be monitored

    • Password or SSH Key Passphrase. Enter a valid password for an SSH user account on the device to be monitored.

    • Port. Enter the Port number associated with the data you want to retrieve. This field is required.

    • SSH Key. Enter the SSH private key that you want SL1 to use.

    The Username and Password fields are not required. You should only populate these fields if authentication is required. Otherwise, leave them blank.

  2. Click the Save Credential button.

  3. Select the credential that you want to use and click the Continue button at the bottom of the page.

Creating a Dynamic Application

If you created a Dynamic Application previously, you can select it at the top of the page. Otherwise, you will need to create a new Dynamic Application. Enter values and make selections in the prompts that appear.

This version of the Dynamic Application Builder allows the creation of Snippet Configuration Dynamic Applications only.

Each of the steps represent a field in the Dynamic Application Properties Editor. For explanations of each field, see the section Dynamic Application Properties.

Once you have finished, click the Add New Dynamic Application button. The Dynamic Application is added to the table at the top of the page, to be selected for use. Select the Dynamic Application you want to use and click the Continue button at the bottom of the page.

This version of the Dynamic Application Builder does not support editing Dynamic Applications. To delete a Dynamic Application that is no longer needed, click the trashcan icon next to the Dynamic Application you want to delete.

Retrieving the Payload

In the next step of the wizard, if you are using an HTTP credential, you can fetch the payload from the API to verify that your API call is correct. If you are using an SSH credential, you can run an SSH Command to fetch a payload.

Retrieving the Payload Using an HTTP Credential

  1. Enter an API endpoint in the URL to API Endpoint field.

  2. Click the Fetch Payload button. The results of the API call appear below.

  3. If you want to manually define your own snippet argument, click the Skip to Define Collection Objects button. Otherwise, click the Continue button at the bottom of the page.

Retrieving the Payload Using an SSH Credential

  1. Enter a command to run on your device in the SSH Command field.

  2. Click the Run Command button. The results will appear below, as well as parsing options.

If you want more information about choosing a Parser, click the Parser Help button for a tutorial. For detailed information about JC, click the Help button under Choose Parser.

  1. Select a Parser from the Parsers Available drop-down field and supply any necessary information in the other fields.

  2. Click the Test button to test the parsing options you selected.

  3. If the ouput is valid JSON, you can click the Go to JSON Selector button to skip to the JSON selector widget. Otherwise, click the Define Collection Objects button to continue.

Next, select the values from the response payload that you want to collect.

  1. Drag the values you want to collect to the Selected Values section on the right side of the page.

  2. Click the Continue button at the bottom of the page.

Creating a Collection Object

In the next step of the wizard, you will select the undefined nodes from the payload to turn into collection objects.

  1. Select the node you want to create a collection object for. Alternatively, click the Define a New Collection Object button to manually create a new collection object.

  2. Under Snippet Argument, you will see the automatically generated Snippet Argument that will be used. You can make changes, if needed.

    • If you want to change a single value selector to multiple values, click the Switch to Multi-Select button. You will be asked for confirmation before switching or switching and testing collection.

  3. Enter any Custom Steps or Substitutions, if needed.

For more information on custom steps or substitutions, see the section Creating a Custom Step.

  1. Click the Test Collection button to verify that any changes you made to the argument will function. The Snippet Framework Output window will appear, where you can view each step of the output to see errors, if they occurred.

  2. Each of the other steps represent a field in the Dynamic Applications | Collections Objects page. For explanations of each field, see the section Creating a Collection Object.

  3. Click the Save Node as Collection Object button.

  4. The new collection object will appear under the Defined collection objects section at the top of the page.

  5. Repeat for other undefined nodes as needed and click the Continue button at the bottom of the page.

To delete a collection object that is no longer needed, click the trashcan icon next to the collection object you want to delete.

Exporting to SL1

In the final step of the wizard, you will select the Dynamic Application you want to export and define the SL1 system you want to export to.

  1. Select the Dynamic Application you want to export.

  2. Complete the following fields under Target SL1:

    • Hostname/IP of SL1 Instance. Enter the IP address or Hostname of the SL1 instance you want to export to.

    • SL1 Username. Enter the username of an administrator account with API access.

    • SL1 Password. Enter the password for the administrator account with API access.

  3. Click the Export to SL1 button.

  4. Click the Return To Start button to go back to step 1 of the builder

Testing Your Dynamic Application

The Dynamic Application Builder creates Dynamic Applications using the Snippet Framework. Please reference the following documentation for editing, testing, and troubleshooting your Dynamic Applications once they have been exported to SL1:

How to Build Dynamic Applications with the Snippet Framework

Troubleshooting

Listed below are known issues you might encounter when using the Dynamic Application Builder, along with workarounds, if available:

  • If the payload you attempt to fetch is too large, you may have difficulty rendering the entire payload on the Select Collection Objects

    screen. This could cause the page to load slowly, or some rows farther down the page not to load at all. The exact size of payload that causes this problem is currently unknown, but a fix for this issue is planned for a future release of the Dynamic Application Builder.

  • You can create credentials and Dynamic Applications with the same name, but if the duplicate name is selected from the auto-complete box, an error will occur, preventing you from creating the object. If you need to create an object with the same name as another, do not use auto-complete to set the name. Type the name in to avoid this error.

  • If you are on SL1 version 12.1.0, you will see the following traceback, which is a known Snippet Framework issue:

    PermissionError: [Errno 13] Permission denied: '/tmp/collection_metrics.log'

    90. During handling of the above exception, another exception occurred:

    91. Traceback (most recent call last):

    92. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 163, in configure

    93. _configure(*vargs, **kwargs)

    94. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 255, in _configure

    95. configure_logging(configs, **kwargs)

    96. File "/opt/em7/lib/python3/silo_logs/silo_logging.py", line 267, in configure_logging

    97. logging.config.dictConfig(config)

    98. File "/usr/lib64/python3.6/logging/config.py", line 802, in dictConfig

    99. dictConfigClass(config).configure()

    100. File "/usr/lib64/python3.6/logging/config.py", line 573, in configure

    101. '%r: %s' % (name, e))

    102. ValueError: Unable to configure handler 'metrics_file_handler_tmp': [Errno 13] Permission denied: '/tmp/collection_metrics.log'

Removing the Dynamic Application Builder

To remove the Dynamic Application Builder, use the following commands:

docker container stop silo_da_builder-silo-da-builder-1

docker container rm silo_da_builder-silo-da-builder-1

docker network rm silo_da_builder_silo-da-builder-net

docker image rm silo-da-builder

docker volume rm pre-commit-cache

If you are removing the Dynamic Application Builder from a Windows system, also use the following command:

rmdir /s C:\ScienceLogic

If you are removing the Dynamic Application Builder from a Mac OSX system, also use the following commands:

rm -rf $HOME/.ScienceLogic

rm -rf $HOME/Applications/ScienceLogic

These commands will reset the environment to its original state prior to the Dynamic Application Builder being installed.

If you have any questions or feedback, contact the PowerPack user group in Salesforce as this is a Limited Availability release.