Objective: Understand the function and use of action templates.
An action template is a predefined command that can be used in the configuration of a host, a service or a user service.
The command will only be executed when there is a confirmed OK to CRITICAL change of state.
Its implementation is linked to the resolution of problems that include, for example, restarting a service (Windows or Linux) or executing a linux command.
The available templates will be enhanced according to the needs of our customers.
Predefined action commands
Action templates support the following commands:
|Applies to||Description||Action command|
|User Service||Writing a variable in the external application PCvue||write_arcinfo_pcvue_variable|
|Hosts||Write to the syslog file of the Linux device associated with the action.||write_syslog_host|
|Execution of a Dos or Powershell command on any Windows device via winexe or winrm.||launch_command_windows_host|
|Unit Service||Execute a command via SSH on any port, on the host associated with the service||launch_command_linux_debian|
|Execution of a Dos or Powershell command on any Windows device via winexe or winrm.||launch_command_windows_service|
|Restart a service on Debian Linux OS, via SSH, on the hostassociated with the service.||restart_service_linux_debian|
|Restart a service on Windows OS, via SSH, on the host associated with the service.||restart_service_windows|
|Write to the syslog file of the Linux device associated with the action. Possibility of not executing this action if the device is in CRITICAL or UNKNOWN state. Possibility of not executing this action if the host or service is in maintenance mode.||write_syslog_service|
To add an action template, go to the section Configuration and then in the menu General > Action template.
Click on "Add": a configuration window opens.
Fill in the general information then click on " Apply ".
You can add action templates for a host, a service or a user service.
Modifying an action template
You can modify an action template. To do so, click on the name of the template to be modified.
Deleting an action template
Select the action template to be deleted and then click on the "Delete" button.
Confirm the deletion of the action template.
Using action templates
Assigning the template to a host, service or user service
To assign an action template to a service, go to Monitoring and then in the menu Monitoring.
Example : I want to automatically restart the Windows Update service if it stops on my server COPCGRE61.
Select the service to configure. The configuration window opens. Go to Action and choose the template.
Enter the service to be restarted and click on Apply.
Note The configuration is the same for a host or user service
Changing the action template
To change an action template, proceed as for the adding. Select the command to be used from the list of action templates.
Deleting an action model
To delete an action model from a service, go to the section Monitoring and then in the menu Monitoring.
Select the service you want to change. The configuration window opens. Go to Action then select the empty field from the list Template.
Then click on Apply.