oracle.oci.oci_apm_synthetics_monitor_facts – Fetches details about one or multiple Monitor resources in Oracle Cloud Infrastructure¶
Note
This plugin is part of the oracle.oci collection (version 4.14.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install oracle.oci
.
To use it in a playbook, specify: oracle.oci.oci_apm_synthetics_monitor_facts
.
New in version 2.9.0: of oracle.oci
Synopsis¶
Fetches details about one or multiple Monitor resources in Oracle Cloud Infrastructure
Returns a list of monitors.
If monitor_id is specified, the details of a single Monitor will be returned.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 3.6
Python SDK for Oracle Cloud Infrastructure https://oracle-cloud-infrastructure-python-sdk.readthedocs.io
Parameters¶
Parameter | Choices/Defaults | Comments |
---|---|---|
api_user
string
|
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See
config_file_location ). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_fingerprint
string
|
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See
config_file_location ). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm. |
|
api_user_key_file
string
|
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See
config_file_location ). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided. |
|
api_user_key_pass_phrase
string
|
Passphrase used by the key referenced in
api_user_key_file , if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location ). |
|
apm_domain_id
string
/ required
|
The APM domain ID the request is intended for.
|
|
auth_purpose
string
|
|
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
|
auth_type
string
|
|
The type of authentication to use for making API requests. By default
auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance. |
cert_bundle
string
|
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
|
|
config_file_location
string
|
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
|
|
config_profile_name
string
|
The profile to load from the config file referenced by
config_file_location . If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location . |
|
display_name
string
|
A filter to return only the resources that match the entire display name.
aliases: name |
|
is_maintenance_window_active
boolean
|
|
A filter to return the monitors whose maintenance window is currently active.
|
is_maintenance_window_set
boolean
|
|
A filter to return the monitors whose maintenance window is set.
|
monitor_id
string
|
The OCID of the monitor.
Required to get a specific monitor.
aliases: id |
|
monitor_type
string
|
A filter to return only monitors that match the given monitor type. Supported values are SCRIPTED_BROWSER, BROWSER, SCRIPTED_REST and REST.
|
|
region
string
|
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See
config_file_location ). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions. |
|
script_id
string
|
A filter to return only monitors using scriptId.
|
|
sort_by
string
|
|
The field to sort by. Only one sort order may be provided. Default order of displayName is ascending. Default order of timeCreated and timeUpdated is descending. The displayName sort by is case insensitive.
|
sort_order
string
|
|
The sort order to use, either ascending (`ASC`) or descending (`DESC`). Default sort order is ascending.
|
status
string
|
|
A filter to return only monitors that match the status given.
|
tenancy
string
|
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See
config_file_location ). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm |
|
vantage_point
string
|
The name of the public or dedicated vantage point.
|
Notes¶
Note
For OCI python sdk configuration, please refer to https://oracle-cloud-infrastructure-python-sdk.readthedocs.io/en/latest/configuration.html
Examples¶
- name: Get a specific monitor
oci_apm_synthetics_monitor_facts:
# required
monitor_id: "ocid1.monitor.oc1..xxxxxxEXAMPLExxxxxx"
apm_domain_id: "ocid1.apmdomain.oc1..xxxxxxEXAMPLExxxxxx"
- name: List monitors
oci_apm_synthetics_monitor_facts:
# required
apm_domain_id: "ocid1.apmdomain.oc1..xxxxxxEXAMPLExxxxxx"
# optional
display_name: display_name_example
script_id: "ocid1.script.oc1..xxxxxxEXAMPLExxxxxx"
vantage_point: vantage_point_example
monitor_type: monitor_type_example
status: ENABLED
is_maintenance_window_active: true
is_maintenance_window_set: true
sort_order: ASC
sort_by: displayName
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description | ||||
---|---|---|---|---|---|---|
monitors
complex
|
on success |
List of Monitor resources
Sample:
[{'availability_configuration': {'max_allowed_failures_per_interval': 56, 'min_allowed_runs_per_interval': 56}, 'batch_interval_in_seconds': 56, 'configuration': {'config_type': 'BROWSER_CONFIG', 'dns_configuration': {'is_override_dns': True, 'override_dns_ip': 'override_dns_ip_example'}, 'is_certificate_validation_enabled': True, 'is_failure_retried': True, 'is_redirection_enabled': True, 'network_configuration': {'number_of_hops': 56, 'probe_mode': 'SACK', 'probe_per_hop': 56, 'protocol': 'ICMP', 'transmission_rate': 56}, 'req_authentication_details': {'auth_headers': [{'header_name': 'header_name_example', 'header_value': 'header_value_example'}], 'auth_request_method': 'GET', 'auth_request_post_body': 'auth_request_post_body_example', 'auth_token': 'auth_token_example', 'auth_url': 'auth_url_example', 'auth_user_name': 'auth_user_name_example', 'auth_user_password': 'example-password', 'oauth_scheme': 'NONE'}, 'req_authentication_scheme': 'OAUTH', 'request_headers': [{'header_name': 'header_name_example', 'header_value': 'header_value_example'}], 'request_method': 'GET', 'request_post_body': 'request_post_body_example', 'request_query_params': [{'param_name': 'param_name_example', 'param_value': 'param_value_example'}], 'verify_response_codes': [], 'verify_response_content': 'verify_response_content_example', 'verify_texts': [{'text': 'text_example'}]}, 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'freeform_tags': {'Department': 'Finance'}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_run_now': True, 'is_run_once': True, 'maintenance_window_schedule': {'time_ended': '2013-10-20T19:20:30+01:00', 'time_started': '2013-10-20T19:20:30+01:00'}, 'monitor_type': 'SCRIPTED_BROWSER', 'repeat_interval_in_seconds': 56, 'scheduling_policy': 'ALL', 'script_id': 'ocid1.script.oc1..xxxxxxEXAMPLExxxxxx', 'script_name': 'script_name_example', 'script_parameters': [{'is_overwritten': True, 'is_secret': True, 'monitor_script_parameter': {'param_name': 'param_name_example', 'param_value': 'param_value_example'}}], 'status': 'ENABLED', 'target': 'target_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_updated': '2013-10-20T19:20:30+01:00', 'timeout_in_seconds': 56, 'vantage_point_count': 56, 'vantage_points': [{'display_name': 'display_name_example', 'name': 'name_example'}]}]
|
||||
availability_configuration
complex
|
on success |
Returned for get operation
|
||||
max_allowed_failures_per_interval
integer
|
on success |
Intervals with failed runs more than this value will be classified as UNAVAILABLE.
Sample:
56
|
||||
min_allowed_runs_per_interval
integer
|
on success |
Intervals with runs less than this value will be classified as UNKNOWN and excluded from the availability calculations.
Sample:
56
|
||||
batch_interval_in_seconds
integer
|
on success |
Time interval between 2 runs in round robin batch mode (*SchedulingPolicy - BATCHED_ROUND_ROBIN).
Sample:
56
|
||||
configuration
complex
|
on success |
Returned for get operation
|
||||
config_type
string
|
on success |
Type of configuration.
Sample:
BROWSER_CONFIG
|
||||
dns_configuration
complex
|
on success |
|
||||
is_override_dns
boolean
|
on success |
If isOverrideDns is true, then dns will be overridden.
Sample:
True
|
||||
override_dns_ip
string
|
on success |
Override dns ip value. This value will be honored only if *ref-isOverrideDns is set to true.
Sample:
override_dns_ip_example
|
||||
is_certificate_validation_enabled
boolean
|
on success |
If certificate validation is enabled, then the call will fail in case of certification errors.
Sample:
True
|
||||
is_failure_retried
boolean
|
on success |
If isFailureRetried is enabled, then a failed call will be retried.
Sample:
True
|
||||
is_redirection_enabled
boolean
|
on success |
If redirection enabled, then redirects will be allowed while accessing target URL.
Sample:
True
|
||||
network_configuration
complex
|
on success |
|
||||
number_of_hops
integer
|
on success |
Number of hops.
Sample:
56
|
||||
probe_mode
string
|
on success |
Type of probe mode when TCP protocol is selected.
Sample:
SACK
|
||||
probe_per_hop
integer
|
on success |
Number of probes per hop.
Sample:
56
|
||||
protocol
string
|
on success |
Type of protocol.
Sample:
ICMP
|
||||
transmission_rate
integer
|
on success |
Number of probe packets sent out simultaneously.
Sample:
56
|
||||
req_authentication_details
complex
|
on success |
|
||||
auth_headers
complex
|
on success |
List of authentication headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]`
|
||||
header_name
string
|
on success |
Name of the header.
Sample:
header_name_example
|
||||
header_value
string
|
on success |
Value of the header.
Sample:
header_value_example
|
||||
auth_request_method
string
|
on success |
Request method.
Sample:
GET
|
||||
auth_request_post_body
string
|
on success |
Request post body.
Sample:
auth_request_post_body_example
|
||||
auth_token
string
|
on success |
Authentication token.
Sample:
auth_token_example
|
||||
auth_url
string
|
on success |
URL to get authetication token.
Sample:
auth_url_example
|
||||
auth_user_name
string
|
on success |
Username for authentication.
Sample:
auth_user_name_example
|
||||
auth_user_password
string
|
on success |
User password for authentication.
Sample:
example-password
|
||||
oauth_scheme
string
|
on success |
Request http oauth scheme.
Sample:
NONE
|
||||
req_authentication_scheme
string
|
on success |
Request http authentication scheme.
Sample:
OAUTH
|
||||
request_headers
complex
|
on success |
List of request headers. Example: `[{"headerName": "content-type", "headerValue":"json"}]`
|
||||
header_name
string
|
on success |
Name of the header.
Sample:
header_name_example
|
||||
header_value
string
|
on success |
Value of the header.
Sample:
header_value_example
|
||||
request_method
string
|
on success |
Request HTTP method.
Sample:
GET
|
||||
request_post_body
string
|
on success |
Request post body content.
Sample:
request_post_body_example
|
||||
request_query_params
complex
|
on success |
List of request query params. Example: `[{"paramName": "sortOrder", "paramValue": "asc"}]`
|
||||
param_name
string
|
on success |
Name of request query parameter.
Sample:
param_name_example
|
||||
param_value
string
|
on success |
Value of request query parameter.
Sample:
param_value_example
|
||||
verify_response_codes
list
/ elements=string
|
on success |
Expected HTTP response codes. For status code range, set values such as 2xx, 3xx.
|
||||
verify_response_content
string
|
on success |
Verify response content against regular expression based string. If response content does not match the verifyResponseContent value, then it will be considered a failure.
Sample:
verify_response_content_example
|
||||
verify_texts
complex
|
on success |
Verifies all the search strings present in the response. If any search string is not present in the response, then it will be considered as a failure.
|
||||
text
string
|
on success |
Verification text in the response.
Sample:
text_example
|
||||
defined_tags
dictionary
|
on success |
Defined tags for this resource. Each key is predefined and scoped to a namespace. Example: `{"foo-namespace": {"bar-key": "value"}}`
Sample:
{'Operations': {'CostCenter': 'US'}}
|
||||
display_name
string
|
on success |
Unique name that can be edited. The name should not contain any confidential information.
Sample:
display_name_example
|
||||
freeform_tags
dictionary
|
on success |
Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only. Example: `{"bar-key": "value"}`
Sample:
{'Department': 'Finance'}
|
||||
id
string
|
on success |
The OCID of the monitor.
Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
|
||||
is_run_now
boolean
|
on success |
If isRunNow is enabled, then the monitor will run now.
Sample:
True
|
||||
is_run_once
boolean
|
on success |
If runOnce is enabled, then the monitor will run once.
Sample:
True
|
||||
maintenance_window_schedule
complex
|
on success |
|
||||
time_ended
string
|
on success |
End time for the maintenance window, expressed in RFC 3339 timestamp format. Example: `2020-02-12T22:47:12.613Z`
Sample:
2013-10-20T19:20:30+01:00
|
||||
time_started
string
|
on success |
Start time for the maintenance window, expressed in RFC 3339 timestamp format. Example: `2020-02-12T22:47:12.613Z`
Sample:
2013-10-20T19:20:30+01:00
|
||||
monitor_type
string
|
on success |
Type of the monitor.
Sample:
SCRIPTED_BROWSER
|
||||
repeat_interval_in_seconds
integer
|
on success |
Interval in seconds after the start time when the job should be repeated. Minimum repeatIntervalInSeconds should be 300 seconds for Scripted REST, Scripted Browser and Browser monitors, and 60 seconds for REST monitor.
Sample:
56
|
||||
scheduling_policy
string
|
on success |
Scheduling policy on Vantage points.
Sample:
ALL
|
||||
script_id
string
|
on success |
The OCID of the script. scriptId is mandatory for creation of SCRIPTED_BROWSER and SCRIPTED_REST monitor types. For other monitor types, it should be set to null.
Sample:
ocid1.script.oc1..xxxxxxEXAMPLExxxxxx
|
||||
script_name
string
|
on success |
Name of the script.
Sample:
script_name_example
|
||||
script_parameters
complex
|
on success |
List of script parameters. Example: `[{"monitorScriptParameter": {"paramName": "userid", "paramValue":"testuser"}, "isSecret": false, "isOverwritten": false}]`
Returned for get operation
|
||||
is_overwritten
boolean
|
on success |
If parameter value is default or overwritten.
Sample:
True
|
||||
is_secret
boolean
|
on success |
Describes if the parameter value is secret and should be kept confidential. isSecret is specified in either CreateScript or UpdateScript API.
Sample:
True
|
||||
monitor_script_parameter
complex
|
on success |
|
||||
param_name
string
|
on success |
Name of the parameter.
Sample:
param_name_example
|
||||
param_value
string
|
on success |
Value of the parameter.
Sample:
param_value_example
|
||||
status
string
|
on success |
Enables or disables the monitor.
Sample:
ENABLED
|
||||
target
string
|
on success |
Specify the endpoint on which to run the monitor. For BROWSER and REST monitor types, target is mandatory. If target is specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script (specified by scriptId in monitor) against the specified target endpoint. If target is not specified in the SCRIPTED_BROWSER monitor type, then the monitor will run the selected script as it is.
Sample:
target_example
|
||||
time_created
string
|
on success |
The time the resource was created, expressed in RFC 3339 timestamp format. Example: `2020-02-12T22:47:12.613Z`
Sample:
2013-10-20T19:20:30+01:00
|
||||
time_updated
string
|
on success |
The time the resource was updated, expressed in RFC 3339 timestamp format. Example: `2020-02-13T22:47:12.613Z`
Sample:
2013-10-20T19:20:30+01:00
|
||||
timeout_in_seconds
integer
|
on success |
Timeout in seconds. If isFailureRetried is true, then timeout cannot be more than 30% of repeatIntervalInSeconds time for monitors. If isFailureRetried is false, then timeout cannot be more than 50% of repeatIntervalInSeconds time for monitors. Also, timeoutInSeconds should be a multiple of 60 for Scripted REST, Scripted Browser and Browser monitors. Monitor will be allowed to run only for timeoutInSeconds time. It would be terminated after that.
Sample:
56
|
||||
vantage_point_count
integer
|
on success |
Number of vantage points where monitor is running.
Sample:
56
|
||||
vantage_points
complex
|
on success |
List of public and dedicated vantage points where the monitor is running.
|
||||
display_name
string
|
on success |
Unique name that can be edited. The name should not contain any confidential information.
Sample:
display_name_example
|
||||
name
string
|
on success |
Name of the vantage point.
Sample:
name_example
|
Authors¶
Oracle (@oracle)