Availability Monitor

A monitor is an APM Availability Monitoring resource which has all the required details about the test and is being run from the selected OCI locations known as Vantage Points.

In this case, you need to create a monitor using the OCI APM Plug-in for Visual Studio Code.

Supported monitor type: Scripted Browser.

List Vantage Points

  1. In the tree navigation on the left side, expand the node for the compartment that you want.

    The APM domains you can access are displayed.

  2. Expand APM Domains, select the required APM domain.
  3. Right click on the Monitors option and click List vantage points.
  4. Copy the name parameter of the vantage point which will be used in the next step: create monitor.

Create Availability Monitor

Prerequisites:

Steps:

  1. In the tree navigation on the left side, expand the node for the compartment that you want.

    The APM domains you can access are shown.

  2. Expand APM Domains, select the required APM domain
  3. Right click on the Monitors option and click Create.
    1. You can copy the below JSON template and provide the mandatory inputs or upload an existing JSON file.

      JSON template for creating a monitor:

      {
        "displayName": "<your_monitor_name>",
        "monitorType": "SCRIPTED_BROWSER",
        "vantagePoints": [
          "<vantage_point_name1>",
          "<vantage_point_name2>"
        ],
        "scriptId": "<script_ocid>",
        "status": "ENABLED",
        "repeatIntervalInSeconds": 300,
        "isRunOnce": false,
        "timeoutInSeconds": 60,
        "target": "<your_target_base_url>",
        "configuration": {
          "configType": "SCRIPTED_BROWSER_CONFIG",
          "isFailureRetried": true,
          "dnsConfiguration": {
            "isOverrideDns": false,
            "overrideDnsIp": "string"
          },
          "isCertificateValidationEnabled": true,
          "isDefaultSnapshotEnabled": true,
          "networkConfiguration": {}
        },
        "availabilityConfiguration": {
          "maxAllowedFailuresPerInterval": 0,
          "minAllowedRunsPerInterval": 1
        },
        "maintenanceWindowSchedule": {},
        "freeformTags": {},
        "definedTags": {},
        "isRunNow": false,
        "schedulingPolicy": "ALL"
      }
      Example:
      {
        "displayName": "monitor_1",           // required
        "monitorType": "SCRIPTED_BROWSER",    // required
        "vantagePoints": [                    // required
          "OraclePublic-us-ashburn-1",
          "OraclePublic-us-phoenix-1"
        ],
        "scriptId": "ocid1.apmsyntheticscript.oc1.phx.aaarkya",    // required
        "status": "ENABLED",
        "repeatIntervalInSeconds": 300,       // required
        "isRunOnce": false,
        "timeoutInSeconds": 60,
        "target": "https://www.example.com/",  // required
        "configuration": {
          "configType": "SCRIPTED_BROWSER_CONFIG",
          "isFailureRetried": true,
          "dnsConfiguration": {
            "isOverrideDns": false,
            "overrideDnsIp": "0.0.0.0"
          },
          "isCertificateValidationEnabled": true,
          "isDefaultSnapshotEnabled": true,
          "networkConfiguration": {"numberOfHops":50, "probeMode":"SACK", "probePerHop":3, "protocol":"TCP", "transmissionRate":16}
        },
        "availabilityConfiguration": {
          "maxAllowedFailuresPerInterval": 0,
          "minAllowedRunsPerInterval": 1
        },
        "maintenanceWindowSchedule": {"timeEnded":"2025-01-01T00:00:00+00:00", "timeStarted":"2025-01-01T00:00:00+00:00"},
        "freeformTags": {"tag_name1":"tag_value1", "tag_name2":"tag_value2"},
        "definedTags": {"tag_name1":"tag_value1", "tag_name2":"tag_value2"},
        "isRunNow": false,
        "schedulingPolicy": "ALL"}
    2. Click Create to create the monitor. After, click Save as JSON to save input values as JSON file and use this file later to create monitors.

View Monitor Details

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain
  3. Right click on monitor to view its details and click Get details.

View Availability Monitor in Browser

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click on monitor to be viewed in browser and click View in browser....

Edit Availability Monitor

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click on monitor to be edited and update values.
  4. Click:

    Edit to edit monitor.

    Save as JSON to save input values as JSON file and use this file later to create monitors.

Run Now Monitor

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click on monitor run now execution and click Run now.

Copy Monitor OCID

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click on monitor and click Copy OCID.

View Monitor Execution Result

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain
  3. Right click on monitor, expand Execution results , select Get execution results.

View Error Message

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click on monitor, expand Execution results, select View error message.

Download HAR, Logs, Screenshots

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain.
  3. Right click monitor, expand Execution results, select Download execution HAR or Download execution logs or Download execution screenshots.
  4. It prompts for the timestamp, enter its value.
    Note

    You can get the timestamp value from the output of Get execution results command.

    After, select the vantage point for which you want to download the result.

  5. Select the location to download the file. It downloads the file to the local system.

Delete Availability Monitor

  1. In the tree navigation on the left side, expand the node for the compartment that you want.
  2. Expand APM Domains, select required domain
  3. Right click on monitor to be deleted and click Delete.
  4. Select yes from the prompt.