Data Source: oci_stack_monitoring_metric_extensions
This data source provides the list of Metric Extensions in Oracle Cloud Infrastructure Stack Monitoring service.
Returns a list of metric extensions
Example Usage
data "oci_stack_monitoring_metric_extensions" "test_metric_extensions" {
#Optional
compartment_id = var.compartment_id
enabled_on_resource_id = oci_usage_proxy_resource.test_resource.id
metric_extension_id = oci_stack_monitoring_metric_extension.test_metric_extension.id
name = var.metric_extension_name
resource_type = var.metric_extension_resource_type
state = var.metric_extension_state
status = var.metric_extension_status
}
Argument Reference
The following arguments are supported:
compartment_id- (Optional) The ID of the compartment in which data is listed.enabled_on_resource_id- (Optional) A filter to return metric extensions based on input resource Id on which metric extension is enabledmetric_extension_id- (Optional) Identifier for the metric extensionname- (Optional) A filter to return resources based on name.resource_type- (Optional) A filter to return resources based on resource type.state- (Optional) A filter to return metric extensions based on Lifecycle Statestatus- (Optional) A filter to return resources based on status e.g. Draft or Published
Attributes Reference
The following attributes are exported:
metric_extension_collection- The list of metric_extension_collection.
MetricExtension Reference
The following attributes are exported:
collection_method- Collection Method Metric Extension appliescollection_recurrences- Schedule of metric extension should use RFC 5545 format -> recur-rule-part = “FREQ”;“INTERVAL” where FREQ rule part identifies the type of recurrence rule. Valid values are “MINUTELY”,“HOURLY”,“DAILY” to specify repeating events based on an interval of a minute, an hour and a day or more. Example- FREQ=DAILY;INTERVAL=1compartment_id- Compartment Identifier OCIDcreated_by- Created by userdescription- Description of the metric extension.display_name- Metric Extension resource display nameenabled_on_resources- List of resource details objects having resourceIds on which this metric extension is enabled.resource_id- The OCID of the resource on which Metric Extension is enabled
enabled_on_resources_count- Count of resources on which this metric extension is enabled.id- The OCID of Metric Extension resourcelast_updated_by- Last updated by usermetric_list- List of metrics which are part of this metric extensioncompute_expression- Compute Expression to calculate the value of this metricdata_type- Data type of value of this metricdisplay_name- Display name of the metric.is_dimension- Current metric need to be included as dimension or notis_hidden- Flag to marks whether a metric has to be uploaded or not. When isHidden = false -> Metric is uploaded, isHidden = true -> Metric is NOT uploadedmetric_category- Metric categoryname- Name of the metric.unit- Unit of metric value
name- Metric Extension resource namequery_properties- Collection method and query properties details of metric extensionarguments- Arguments required by either command or scriptauto_row_prefix- Prefix for an auto generated metric, in case multiple rows with non unique key values are returnedcollection_method- Type of possible collection methods.command- OS command to execute without argumentsdelimiter- Character used to delimit multiple metric values in single line of outputidentity_metric- Semi-colon separated list of key properties from Managed Bean ObjectName to be used as key metricsin_param_details- List of values and position of PL/SQL procedure IN parametersin_param_position- Position of IN parameterin_param_value- Value of IN parameter
is_metric_service_enabled- Indicates if Metric Service is enabled on server domainjmx_attributes- List of JMX attributes or Metric Service Table columns separated by semi-colonmanaged_bean_query- JMX Managed Bean Query or Metric Service Table nameout_param_details- Position and SQL Type of PL/SQL OUT parameterout_param_name- Name of the Out Parameterout_param_position- Position of PL/SQL procedure OUT parameter. The value of this property is ignored during update, if “outParamType” is set to NO_OUT_PARAM value.out_param_type- SQL Type of PL/SQL procedure OUT parameter. During the update, to completely remove the out parameter, use the value NO_OUT_PARAM. In that case, the value of “outParamPosition” will be ignored.
protocol_type- Supported protocol of resources to be associated with this metric extension. This is optional and defaults to HTTPS, which uses secure connection to the URLresponse_content_type- Type of content response given by the http(s) URLscript_details- Script details applicable to any OS Command/HTTP based Metric Extension which needs to run a script to collect data. For removing it during OS Command based Metric Extension update, set its “content” property to an empty string. In that case, “name” property value is ignored.content- Content of the script/JavaScript file as base64 encoded stringname- Name of the script file
sql_details- Details of Sql content which needs to execute to collect Metric Extension datacontent- Sql statement or script file content as base64 encoded stringscript_file_name- If a script needs to be executed, then provide file name of the script
sql_type- Type of SQL data collection method i.e. either a Statement or SQL Script Filestarts_with- String prefix used to identify metric output of the OS Commandurl- Http(s) end point URL
resource_type- Resource type to which Metric Extension appliesresource_uri- The URI path that the user can do a GET on to access the metric extension metadatastate- The current lifecycle state of the metric extensionstatus- The current status of the metric extension i.e. whether it is Draft or Publishedtenant_id- Tenant Identifier OCIDtime_created- Metric Extension creation time. An RFC3339 formatted datetime string.time_updated- Metric Extension update time. An RFC3339 formatted datetime string.