Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Modify User-Defined Action and Function Engines

The following section describes how you can modify the UDA/UDF engine in Paragon Insights command line interface (CLI). This feature is supported in standalone Paragon Insights versions 2.1.0 and later and not supported in Paragon Automation Platform.

You can modify the UDA or UDF engine using the Paragon Insights CLI, as shown below.

The commands have three main options:

  • Simulate—test a script (and view its output) in the simulated UDA/UDF engine environment without affecting the running Paragon Insights system

  • Modify—modify the actual UDA/UDF engine using a script

  • Rollback—revert to the original version of the UDA/UDF engine

Usage Notes

  • The bash script will run in a container running Ubuntu OS Release 16.04 or 18.04; write the script accordingly.

  • The script must be non-interactive; any questions must be pre-answered. For example, use the ‘-y’ option when installing a package using apt-get.

  • If you prefer to copy the source packages of the dependency modules onto the Paragon Insights server so the engine can manually install them instead of downloading them from the Internet, place the required source packages in the /var/local/healthbot/input directory. Then within your bash script, point to the /input directory. For example, to use a file placed in /var/local/healthbot/input/myfile.txt, set the bash script to access it at /input/myfile.txt.

  • Modifying the UDA/UDF engine more than once is not an incremental procedure; use a new bash script that includes both the original and new instructions, and re-run the modify procedure using the new script.

  • UDA/UDF modifications are persistent across upgrades.

Note:

The examples below use the UDA engine; these procedures apply equally to the UDF engine.

Note:

The procedure below assumes your Paragon Insights server is installed, including running the sudo healthbot setup command.

Simulate

Use the simulate feature to test your bash script in the simulated environment, without affecting the running Paragon Insights system.

To simulate modifying the UDA engine:

  1. Enter the command healthbot modify-uda-engine -s /<path>/<script-file> --simulate.

  2. The script runs and the output shows on screen, just as if you entered the script commands yourself.

Modify

When you are satisfied with the simulation results, go ahead with the actual modification procedure.

To modify the UDA engine:

  1. Load the desired bash script onto the Paragon Insights server.

  2. If your Paragon Insights server is fully up and running, issue the command healthbot stop -s alerta to stop the running services.

  3. Run the command healthbot modify-uda-engine -s /<path>/<script-file>.

  4. (Optional) As noted in the output, you can check the log file to further verify the script was loaded successfully.

  5. Restart the alerta service using the command healthbot start -s alerta.

  6. Once complete, verify that the alerta service is up and running using the command healthbot status.

  7. To verify that the UDA engine has been updated, use the command healthbot version -s alerta and check that the healthot_alerta container is using the <version>-custom tag.

The UDA engine is now running with the installed dependencies as per the bash script.

Rollback

If you have a need or desire to remove the changes to the engine, you can revert the engine to its original state.

To rollback the UDA engine:

  1. Enter the command healthbot modify-uda-engine --rollback.

    Note that it is not necessary to restart the alerta service at this point.

  2. Once complete, verify that the alerta service is up and running using the command healthbot status.

  3. To verify that the UDA engine has reverted back, use the command healthbot version -s alerta and check that the healthot_alerta container is using the <version> tag.

The UDA engine is now running in its original state, with no additional installed dependencies.