Create a Monitor
To set up the Synthetic Monitoring feature, you must create a monitor to monitor the availability and performance of your application across geographical locations and send metrics to Oracle Cloud Infrastructure.
If you want to create the Scripted Browser and Scripted REST monitor types, you must ensure that you've created a script. For information, see Create a Script.
To create a monitor:
- Navigate to the Synthetic Monitoring page.
- On the left pane, ensure that Monitors is selected.
- On the left pane, select the compartment and the APM domain in which you want to create the monitor.
- Click Create Monitor.The Create Monitor wizard is displayed.
- On the Monitor Definition page:
- Name: Enter a unique name for the
monitor.
The name can have a maximum of 255 alphanumeric characters. A hyphen and an underscore are the only two special characters allowed. For example, you can add a hyphen between two characters and an underscore at the beginning or the end of the name or between characters. Blank spaces are not allowed.
- Type: Select one of the following
monitor types:
- Browser: Tests the performance of a single URL loaded by a browser.
- Scripted Browser: Tests the
performance of a complete user transaction workflow recorded in
a
.side
script file. - REST: Tests the performance of a single URL loaded by a REST call.
- Scripted REST: Tests the
performance of a complete user transaction workflow recorded in
a
.js
script file. - Network:Tests the availability and performance of any network server or host which gets accomplished by pinging the host.
- DNS: Validates and tests the availability of the DNS.
- SQL: Measures the performance of a SQL query allowing the user to spot any availability or load time issues.
- FTP: Measures the performance of FTP operations allowing the user to spot any availability or latency issues. It takes target FTP server details as input and runs the requested operation to generate various timing metrics.
- Update the fields displayed based on the monitor type selected in the previous step:
- For the Browser monitor type:
- Base URL: Specify the base URL on which to run the monitor.
- Response Validations: Optionally, select the following check box:
- Response Code: Specify valid HTTP status codes separated by commas. For example:
200,
401
. It also accepts the following format:2xx, 3xx, 4xx
. - Verify Response Content: Add a string or REGEX to verify expected response in response headers and body.
- Response Code: Specify valid HTTP status codes separated by commas. For example:
- Verify Response Content Optional: Optionally, add a string to verify expected response content. For details, see Verify Response Content (Optional).
- Options: Optionally, select the following check boxes:
- Verify SSL: Select this option to verify the validity of the SSL certificate.
- Enable Snapshot: Select this option to enable or disable the monitor to collect screenshots during the execution. By default, it's enabled.
- Override DNS: Select this option to specify the IP address to which the target's domain name will resolve, instead of using the standard DNS resolution.
- For the Scripted Browser monitor type:
- Script: Select a script file from the drop-down list, which is populated with the names of the
.side
scripts you've created. - Base URL Optional: Based on the selected
.side
script file, this field is populated with the base URL on which the monitor is to be run. Optionally, you can also specify the base URL in this field. - Script Parameters: If script parameters are defined in the contents of the script file, then they are displayed in the Script Parameter fields and you can choose to replace the parameter values. Note that the parameter value is not displayed if the Value is secret option is used when creating or uploading the script.
- Options: Optionally, select the following check boxes:
- Verify SSL: Select this option to verify the validity of the SSL certificate.
- Enable Snapshot: Select this option to enable or disable the monitor to collect screenshots during the execution. By default, it's enabled.
- Override DNS: Select this option to specify the IP address to which the target's domain name will resolve, instead of using the standard DNS resolution.
- Script: Select a script file from the drop-down list, which is populated with the names of the
- For the REST monitor type:
- Base URL: Specify the base URL on which to run the monitor.
- Request Configuration Method: Select a request configuration method:
GET
orPOST
. For thePOST
method, you can optionally enter the request payload information in the Request Body field. - Authentication Type: Select a type of authentication:
- None: Select this option if no authentication is required.
- Basic Auth: Select this option if basic authentication is required and specify the User Name and Password.
- Bearer Token: Select this option if bearer authentication is required and specify the Token.
- OAuth: Select this option if open authentication is required and specify the Authentication Scheme and information in the fields that are displayed based on the authentication scheme.
- Resource Principal: Select this option to grant access and monitor OCI resources, such as object storage or vault, without specifying credentials. It uses a dynamic group and policies which provides fine-grained control.
Note
To use resource principal authentication, you need to create a dynamic group and add polices to it to access the resources in the tenancy and grant APM Synthetic monitors access to OCI resources in their tenancy. For details, see Perform Oracle Cloud Infrastructure Prerequisites.
- Query Parameters Optional: Optionally, specify the request configuration query parameters.
- Header Parameters Optional: Optionally, specify the request configuration header parameters.
- Client Certificate Optional: Optionally, specify the certificate information for client authentication.
- Private Key: Upload the private key file.
- Certificate: Upload the client certificate file.
Note
PEM format is supported for the private key and client certificate.
- Response Validations: Optionally, select the following check box:
- Response Code: Specify valid HTTP status codes separated by commas. For example:
200,
401
. It also accepts the following format:2xx, 3xx, 4xx
. - Verify Response Content: Add a string or REGEX to verify expected response in response headers and body.
- Response Code: Specify valid HTTP status codes separated by commas. For example:
- Options: Optionally, select the following check boxes:
- Verify SSL: Select this option to verify the validity of the SSL certificate.
- Follow Redirects: Select this option to follow redirects.
- Override DNS: Select this option to specify the IP address to which the target's domain name will resolve, instead of using the standard DNS resolution.
- For the Scripted REST monitor type:
- Script: Select a script file from the drop-down list, which is populated with the names of the
.js
scripts you've created. - Base URL Optional: Based on the selected
.js
script file, this field is populated with the base URL on which the monitor is to be run. Optionally, you can also specify the base URL in this field. - Script Parameters: If script parameters are defined in the contents of the script file, then they are displayed in the Script Parameter fields and you can choose to replace the parameter values. Note that the parameter value is not displayed if the Value is secret option is used when creating or uploading the script.
- Authentication: Optionally, select the following check box:
- Resource Principal: Select this option to grant access and monitor OCI resources, such as object storage or vault, without specifying credentials.
Prerequisites: To use Resource Principal authentication, perform the following prerequisites:
- Policies: Create a dynamic group and add polices to it to access the resources in the tenancy and grant APM Synthetic monitors access to OCI resources in their tenancy. For details, see Perform Oracle Cloud Infrastructure Prerequisites.
- Java Script file changes: Make the following changes in the script:
- Include oci-common module
const common = require('oci-common');
- Create signer
const provider = common.ResourcePrincipalAuthenticationDetailsProvider.builder();
const signer = new common.DefaultRequestSigner(provider)
- Sign Request
signer.signHttpRequest(options)
- Copy headers
var headers = {};
options.headers.forEach(function(i,v){
headers[v] = i;
});
- Include oci-common module
- Resource Principal: Select this option to grant access and monitor OCI resources, such as object storage or vault, without specifying credentials.
- Response Validations: Optionally, select the following check box:
- Response Code: Specify valid HTTP status codes separated by commas. For example:
200,
401
. It also accepts the following format:2xx, 3xx, 4xx
.
- Response Code: Specify valid HTTP status codes separated by commas. For example:
- Options: Optionally, select the following check box:
- Override DNS: Select this option to specify the IP address to which the target's domain name will resolve, instead of using the standard DNS resolution.
- Script: Select a script file from the drop-down list, which is populated with the names of the
- For Network monitor type:
- Base URL: Specify the server on which to run the monitor.
The IP address or the fully qualified domain name (FQDN) of the server are accepted values. For example:
192.168.1.1
example.com
Note
If using TCP protocol, you need to also provide the port number. For example:192.168.1.1:8080
example.com:80
- Protocol: Specify the network protocol to be used by the monitor. It can be
TCP
orICMP
.If TCP is selected, the port number is mandatory for the Base URL parameter.
If ICMP is selected, the port number is not required.
- Probe Mode: Specify the probe mode for the TCP network protocol. It can be:
SACK
orSYN
. Note Probe Mode is only available for the TCP network protocol. - Enable IPV6: If checked, provide a Target which can be either a domain name or in the following format:
[IPv6]:port
. For example: format:[2001:db8:3333:4444:5555:6666:7777:8888]:90
ororacle.com:90
.
- Base URL: Specify the server on which to run the monitor.
- For DNS monitor type:
- Configuration type: Select a configuration type for the DNS monitor:
- DNS Server: It runs queries against target server. It measures resolution time and availability for the target along with network metrics if enabled.
- DNS Trace: It validates the DNS requests that are correctly delegated to the authoritative servers in child zone from parent zone.
- DNSSEC: It validates the authenticity of DNS records according to Domain Name System Security Extensions. It provides view for DNSSec Trust Tree and Data Chain.
- Domain: Specify the domain name or IP address to be used by the monitor.
- Record Type: Specify the DNS record type to be used by the monitor using the dropdown list available.
- Send recursive queries: Check the checkbox if you want to send DNS queries in recursive mode. This option is only available if the DNS Server monitor configuration type is selected.
- Transport Protocol: Specify the network protocol using the dropdown list. It can be:
TCP
orUDP
.This option is available if the DNS Server or DNS Trace monitor configuration types are selected.
- DNS Server: Specify the domain name or the IP address of DNS name server that will be queried for the domain name in the domain field.
This option is only available if the DNS Server monitor configuration type is selected.
- Enable IPV6: If checked, provide an IPv6 address or a domain name for DNS Server. If Record Type is PTR, then the Domain should be using the following format:
0.f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.0.f.e.d.c.b.a.9.8.7.6.5.4.3.2.1.ip6.arpa
. IPv6 PTR records are stored under the.ip6.arpa
domain.
- Configuration type: Select a configuration type for the DNS monitor:
- For SQL monitor type:
- Database type: Select the database type. Currently supported Oracle and MySQL.
- Username: Specify the username for database authentication. (Required).
- Password Type: Specify the type for database authentication. The following are the two supported formats:
- Secret OCID: OCI vault secret ocid. For details, see Using Vault Secrets with Resource Principals.
- Text: Password in plain text format.
- Password: The password/secret ocid for database authentication. (Required). For details, see Using Vault Secrets with Resource Principals.
- Database role: Specify the database role. (Optional).
For Oracle database and
SYS
database user, you must provide the database roleSYSDBA
orSYSOPER
.It's recommended to create monitor with a database user that has minimum privileges.
- Database connection type: Specify the connection type for database. The following two types are supported:
- Custom JDBC: For this type, the Custom JDBC URL is required.
- Cloud Wallet: This option is only available when selecting Oracle database.
- Database wallet: Specify the database cloud wallet configuration zip file. (Required).
- Service name: Specify the database Service name to be used in establishing connection. (Required).
- SQL Query: Specify the SQL query to fetch data from database. Only select statement is allowed. (Required).
- For FTP monitor type:
- Protocol type: The protocol supported by target FTP server (Required).
The following types are supported: FTP, FTPS and SFTP.
- Request type: The request to get performed by FTP. (Required).
The following types are supported: Download, Upload and List.
- Path: The absolute path to the file or directory.
Mandatory only if Download request type is selected.
Optional if Upload and List request types are selected. If no path is specified for Upload and List, the home directory of the FTP user which was specified in the authentication, is used as default path.
- File size: The upper limit of the file size for Download and Upload request types.
Mandatory only for upload request type.
- Verify Content: Only available in List request type. (Optional).
User can specify regex to list specific files.
- Active Mode: Only supported for FTP and FTPS protocols. (Optional).
It controls the mode of data transfer and is handled internally by the FTP client library. If enabled, the client establishes the command channel and the server establishes the data channel.
- Authentication:: (Required)
- Username: The username for ftp authentication.
- Password type: The type for the authentication. (Optional).
The following types are supported:
- Secret OCID: OCI vault secret ocid. For details, see Using Vault Secrets with Resource Principals.
- Text: Password in plain text format.
- Password: The password or secret ocid for authentication. For details, see Using Vault Secrets with Resource Principals.
- Protocol type: The protocol supported by target FTP server (Required).
- For the Browser monitor type:
Click Next.
- Name: Enter a unique name for the
monitor.
- On the Run Settings page:
- Vantage Points: Select the vantage points on which you want the monitor to run. If you've set up a Dedicated Vantage Point, then it is also listed in the drop-down list and can be selected. For information on Dedicated Vantage Points, see Use Dedicated Vantage Points.
- Select one of the following radio buttons to determine the
frequency of monitor runs:
- Interval: Select this radio button to determine the interval of time between each monitor run.
- Run Once: Select this radio button if you want the monitor to run only once. If the Run Once radio button is selected, the Scheduling Policy drop-down list and the Interval Between Runs (minutes) field are disabled.
- Scheduling Policy: Select one of the
following options to stagger the monitor runs on the selected vantage
points:
- All: Select this option to run the monitor simultaneously on all selected vantage points.
- Round Robin: Select this option to schedule the monitor run sequentially on each vantage point. This functionality works in tandem with the value specified in the Interval Between Runs (minutes) field. For example, if 10 minutes is specified in the Interval Between Runs (minutes) field and the monitor is to run on five vantage points, then the monitor will run on the vantage points sequentially with an interval of ten minutes between each run. The total duration of the monitor runs on all vantage points will then be 50 minutes, after which the sequential monitor run will begin again.
- Batched Round Robin: Select
this option to schedule the monitor run sequentially on batches
of vantage points. This functionality works in tandem with the
values specified in the Interval Between Runs
(minutes) and Sub-interval Between
Runs (minutes) fields. In this scenario,
monitors are scheduled to run on batches of vantage points and
the interval between each run is specified in the
Sub-interval Between Runs (minutes)
field. The value in the Interval Between Runs
(minutes) field denotes the total time taken for
the monitor run on all batches.
The number of vantage points in each batch is automatically calculated based on the number of selected vantage points and the values specified in the Interval Between Runs (minutes) and Sub-interval Between Runs (minutes) fields. For example, if there are 7 vantage points, Interval Between Runs (minutes) = 10 minutes, and Sub-interval Between Runs (minutes) = 5 minutes, then two batches are created. The first batch of vantage points will have four vantage points and the second batch will have three.
- Interval Between Runs (minutes):
Specify the number of minutes between monitor runs. The default interval
duration is 10 minutes. For the REST monitor
type, you can specify one minute as the minimum duration of the interval
between monitor runs, and for the other monitor types, you can specify
five minutes as the minimum duration.
Note that if the Batched Round Robin option is selected in the Scheduling Policy drop-down list, then the value selected in the Interval Between Runs (minutes) field denotes the total time taken for the monitor run on all batches.
- Sub-interval Between Runs (minutes): Specify the number of minutes between monitor runs on batches of vantage points. Note that this field is only displayed if the Batched Round Robin option is selected in the Scheduling Policy drop-down list.
- Timeout (minutes): Specify the timeout value. This denotes the maximum runtime allowed and if the monitor runtime does not complete within this time, it will be stopped and marked as a failure. Note that the Interval Between Runs value must be about three times more than the Timeout (minutes) value, however, if the Enable Retry check box is not selected, then the Timeout (minutes) value can be set to 50% of the Interval Between Runs value.
- Enable Retry: Select this check box to retry execution in case of failure. Note that this check box is selected by default.
- Enable Network Collection: Select
this check box to enable data collection from the network and monitor
network performance. Note that for a Scripted
REST monitor, this check box is only displayed if the
Base URL is specified on the
Monitor Definition page:
On selecting the Enable Network Collection check box, the following options are displayed:
- Protocol: Select a network protocol.
- Probe Mode: Select a probe mode for the TCP network protocol. Note that the Probe Mode option is only available for the TCP network protocol.
- Probe Per Hop: Specify the number of probe packets sent per hop.
Click Next.
- On the Availability Configuration (Optional) page, you
can select the Enable Availability Configuration check
box to configure the criteria to calculate the availability of the monitor and
view the corresponding details in the Availability widget
in the Oracle-defined Monitors dashboard.
On selecting the Enable Availability Configuration check box, the following options are displayed:
- Maximum failures allowed per interval: Specify the maximum number of failed monitor runs allowed in an interval. An interval with more than the specified number of failed monitor runs will be classified as UNAVAILABLE.
- Minimum runs allowed per interval: Specify the minimum number of monitor runs allowed in an interval. An interval with less than the specified number of monitor runs will be classified as UNKNOWN and excluded from the availability calculations.
Click Next.
For information on viewing the availability of the monitor in the Monitors dashboard, see View Monitor Availability.
- On the Tags (Optional) page, you can choose to use the
Tagging metadata system to organize and track the monitors, and click
Next.In the Tag namespace drop-down list, you can select a namespace that is prefixed with
apm-synthetics
and add a maximum of five Tag keys and Tag values. These key – value pairs will then be added as dimensions and can be used as additional qualifiers for Synthetic Monitoring metrics (oracle_apm_synthetics
namespace). This enables you to monitor other aspects of the monitor and organize and track monitors using an APM-specific tag.Note
The Tag key name cannot be the same as an existing dimension. You can create any tag namespace but only namespaces that have theapm-synthetics
prefix will be picked up and published to the Oracle Cloud Infrastructure Monitoring service as a dimension.For information on:
- Synthetic Monitoring dimensions and metrics, see Available Metrics: oracle_apm_synthetics.
- Tagging, see Tagging Overview.
- On the Summary page, review the summary of the monitor.If the monitor type is REST, you can click View JS to view the Javascript based on the input provided on the previous steps.
A window is displayed with the generated Javascript based on the input provided on the previous steps. At the top right corner, you have the following options available: Copy, Download or Create Script.
If Create Script is selected, the Create Script page is displayed to create a Javascript script. The created script can be used to create SCRIPTED REST monitors later.Under the Create Script page, enter the script name, follow the steps and once completed, click Create to create the Javascript script. For details about creating scripts, see Create a Script.
- Click Create to create the monitor.
You can also use the options available on the top of the page to perform the following actions on the monitor:
- Edit: Click to edit monitor information.
- Clone: Click to clone the monitor.
- Disable: Click to disable the monitor.
- Run Now or Run Once:
Click Run Now to run the monitor immediately. This option
is only displayed for monitors that have scheduled monitor runs and is not
displayed if the Run Once option was selected when
creating the monitor. If you select the Run Now option, a
new instance of the monitor is created and is executed just once. This does not
impact the existing monitor run schedule, and for the Run
Now mode, a separate set of results is listed in a new row on
the Monitors page.
Click Run Once to run the monitor. This option is only displayed if the Run Once check box was selected when creating the monitor.
Click More actions to perform the following tasks:
- Enable maintenance window: Click to enable a maintenance window for the monitor.
- Add Tags: Click to add tags to the monitor.
- Delete: Click to delete the monitor.
On navigating to the Monitors page, you'll find the newly created monitor listed. You can select one or more monitors and click Actions and then select Manage maintenance window to enable or disable a maintenance window. For more information, see Manage Maintenance Windows.