Skip to main content

How to Create a Runbook

Create a custom runbook when the inbuilt catalogue does not cover a task you need. ObserveOps supports eight runbook types, each with its own form.

Before You Begin​

  • You can reach Settings > Plugin Library > Runbook.
  • A credential profile exists for the monitor the runbook will target (SSH, WinRM, SNMP, Database, or HTTP).
  • You know the exact command, OID, SQL query, or endpoint the runbook needs to call.

Steps​

  1. Go to Settings , open Plugin Library , and select Runbook.

  2. Click Create Runbook Plugin. The Create Runbook screen opens.

  3. Pick the runbook type from the top menu: SSH, Telnet, Powershell, SNMP, Trace Route, Database, HTTP, or Custom.

  4. Fill in the common fields:

    FieldWhat to enter
    Runbook NameA short, unique name.
    DescriptionOne line on what the runbook returns or does.
    Runbook CategoryPick the functional group: Diagnostics, Performance Monitoring, Troubleshooting, System Management, Log Collection, Network Config, or Integration.
    MonitorPick by Group, Tag, IP/Host, or Monitors and select one or more targets.
    Credential ProfilePick the saved credential for the protocol. If none exists, click Create Credential Profile.
    PortThe port the runbook connects on.
    TimeoutSeconds to wait before marking the run Failed.
  5. Fill in the type-specific fields:

    TypeExtra fields
    SSHSSH Script (the shell command), Script Language (defaults to GO), Parsing Script that turns raw output into result values.
    TelnetTelnet Script. No parsing script.
    PowershellPowershell Script, Script Language (GO), Parsing Script.
    SNMPScalar or Tabular, OID Listing (OID Name, OID, or Choose OID from the OID picker), Add OID Group for a tabular walk, Parsing Script.
    Trace RouteMaximum Hops, Probes, Timeout. No script.
    DatabaseType (database engine), SQL Script, Parsing Script.
    HTTPURL Type (HTTP or HTTPS), URL Method (GET or POST), JSON URL (No or Yes), URL Content, URL Endpoint, optional Parameters and Headers, Parsing Script.
    CustomScript Language (GO), Script. The agent runs this on the monitor.
  6. To expose a value the runbook asks for at run time, click Add Variable and name it. Reference it in the script as $$$variable.name$$$.

    note

    The variable name in the script must match the name under Add Variable exactly. Mismatched names show as empty on the result screen.

  7. Click Test. ObserveOps runs the runbook once against the chosen monitor and shows the raw output and the parsed values below the form.

  8. If the result looks right, click Save. The new runbook appears on the Runbook screen.

Result​

The runbook is listed on Settings > Plugin Library > Runbook with the category you picked. Open its row menu to assign it to monitors, schedule it, or clone it.

Troubleshooting​

IssueCauseFix
Test returns "Connection refused"The port is wrong or blocked.Confirm the port in the monitor profile and open the firewall.
Test returns raw output but no parsed valuesThe parsing script does not match the output format.Open the Sample Parsing Script sidebar for the type (SSH Availability, Powershell Availability, SNMP Availability, Database Script, HTTP availability) and copy its pattern.
Save is disabledA required field is empty or a variable in the script has no matching entry under Add Variable.Fill the red-marked fields and add every placeholder in the script to the variable list.

Next Steps​