Runbooks

Runbooks

Settings

Runbooks

Configure automated remediation scripts that execute on agent-monitored devices when an alarm fires. Cloudmon provides over 100 pre-built runbook templates and supports custom runbooks for organisation-specific tasks.

Overview

Runbooks in Cloudmon are ready-to-run scripts that can be executed automatically on agent-monitored devices when an alarm trigger fires, or run manually at any time. Automated remediation through runbooks reduces mean time to resolution, eliminates manual intervention for known recurring issues, and helps prevent downtime by acting on problems the moment they are detected.

Cloudmon includes over 100 built-in runbook templates covering tasks such as restarting services, clearing DNS caches, taking screenshots, fetching email status, and more. If the built-in templates do not cover a specific requirement, custom runbooks can be created. Runbooks are exclusively available for agent-monitored devices. Navigate to Settings → Configurations → Runbooks to view and manage all runbooks. Built-in templates can be opened in a read-only View Runbook panel; only custom runbooks can be edited.

Using Runbook Templates

  1. Navigate to Settings → Configurations → Runbooks.
  2. Browse or search the list of over 100 pre-defined runbook templates, shown with their name, description, and underlying filename.
  3. Click the runbook's view icon to see its details, including the script filename, filter expression, timeout, and arguments.
  4. To attach it to an alarm, navigate to Settings → Configurations → Alarm Rules, open the relevant rule, add a trigger, and in the THEN section enable Run Script. Select whether to run on the controller or the agent, then choose the runbook from the dropdown.

Creating a Custom Runbook

  1. Navigate to Settings → Configurations → Runbooks.
  2. Click Add.
  3. Fill in the fields as described in the table below.
  4. Click Save. The custom runbook is now available for selection in alarm rule triggers alongside the built-in templates.
FieldDescription
Name*A descriptive name for the runbook.
DescriptionA brief description of the runbook's purpose, such as what it does and when it should be used.
FilterAn expression restricting which agents this runbook can run on, such as os.platform == linux. This is also how Cloudmon enforces operating system compatibility, since there is no separate OS field. Hover over the info icon for the expected format.
Type*Select Script to upload a script file to run, or Command to enter a single command to be executed on the agent.
Script*Only shown when Type is Script. Click Choose File to upload the script file that will run on the target agent.
Timeout (seconds)The maximum time the system waits for the script or command to complete before stopping the execution. Defaults to 5.
ArgumentsClick Add to define a parameter the script or command expects. Each argument has its own Name and Description, entered in a separate Add Argument dialog, and appears as a tag on the main form once added. Repeat for each parameter the script accepts.

Supported Script Types

When Type is set to Script, the uploaded file is executed on the target agent. There is no separate language selector; the script's file extension determines how it runs, and the Filter expression (e.g. os.platform == linux) determines which agents it is eligible to run on. Supported script types include:

  1. Batch (CMD) | Windows
  2. PowerShell | Windows
  3. Bash | Linux
  4. Python
  5. Node.js

When Type is set to Command, a single shell or PowerShell command is executed directly on the agent without a script file.

Running Runbooks

Runbooks can be executed in three ways:

Automatic Execution via Alarm Rules

When an alarm fires, Cloudmon automatically executes the runbook attached to the alarm trigger. Navigate to Settings → Configurations → Alarm Rules, open the rule, add a trigger, and in the THEN section enable Run Script. Select whether to run on the controller or the agent, then choose the runbook. When the alarm is raised, the runbook executes automatically and the output is shown in the alarm overlay.

Manual Execution via an Active Alarm

When an alarm is triggered, click on the alarm, hover over Execute Runbook to view the list of available runbooks, and select the desired script. This allows for manual control over which runbook is executed for a specific active alarm.

Manual Execution via Agent Actions

Runbooks can also be executed directly from any agent's detail page without needing an active alarm. Navigate to Agents → All Agents, select an agent, and click the Actions icon. A list of all available runbooks including any custom runbooks is displayed. Click the run icon to execute a runbook, or the history icon to view past executions and their outputs. You can also click the command icon to manually execute a one-off command on the agent and view the output under All History.