Execution templates
  • 2 minutes to read
  • Dark
    Light
  • PDF

Execution templates

  • Dark
    Light
  • PDF

Article Summary

A template is a set of commands to be executed to perform an activity by a plugin (executor). It's important to note that you can use the same execution plugin for templates with different objectives. Some activities require templates to display specific orders and commands, while others don't. A template for installing update packages has different execution steps than one that stops or restarts a service.

Register execution template

  1. Access Executions➞Settings➞Templates.
  2. In the top right corner, click (⁝) Show Actions and select New.
  3. Choose a Name that refers to the template's purpose so that it is easy to find whenever you need it, for example, 'Linux - Restart services'. Select Yes to ensure it is enabled.
  4. In Executor, select the plugin this template will use.
  5. In Execution type, select the Task Manager option.
  6. In Content, enter the commands that will be executed in the task.
  7. Save.
Info

The View TAGs button presents a description for using TAGs in templates.

Below is an example of using TAGs in the creation of templates:

#Check service status
        expect "*$"
        exec "service --status-all"

        #Root user access
        expect "*$"
        exec "sudo su"

        #Add root user password
        expect "*:"
        exec "[#AUTH_PASSWORD#]"

        #Stop service
        expect "*#"
        exec "service [#VARIABLE#] stop"

        #Service status
        expect "*#"
        exec "service [#VARIABLE#] status"

        #Restart service
        expect "*#"
        exec "service [#VARIABLE#] restart"

        #End execution task
        expect "*#"
        end

Change execution template

  1. Access the menu Executions➞Settings➞Templates.
  2. Choose the template you want to change. Remember to use the filters at the top of the report if you have many registered templates.
  3. When locating the desired template, click Edit.
  4. Change the required information.
  5. Save.

View template change history

All changes to templates are stored in a query history. These histories are very useful for consulting and restoring templates from a specific period.

  1. Access Executions➞Settings➞Templates.
  2. Choose the template you want to change. Remember to use the filters at the top of the report if you have many registered templates.
  3. When locating the desired template, click (⁝), located in the Action column, and select Template change history.
  4. Select Template details, identified by the magnifying glass icon, and view what has changed.

Clone execution template

Cloning is helpful for new templates that need minor changes in already registered commands.

  1. Access Executions➞Settings➞Templates.
  2. Choose the template whose settings you want to copy. Remember to use the filters at the top of the report if you have many registered templates.
  3. When locating the desired template, click (⁝), located in the Action column, and select Clone.
  4. A confirmation message appears; select Yes.
  5. On the new screen, the template appears with the identification 'Name of your template (copy XX)'.
  6. Make the desired adjustments.
  7. Save.

Learn more about templates:

Execution module - Templates


Was this article helpful?

What's Next