page_title | subcategory | description |
---|---|---|
coralogix_events2metric Resource - terraform-provider-coralogix |
terraform {
required_providers {
coralogix = {
version = "~> 2.0"
source = "coralogix/coralogix"
}
}
}
provider "coralogix" {
#api_key = "<add your api key here or add env variable CORALOGIX_API_KEY>"
#env = "<add the environment you want to work at or add env variable CORALOGIX_ENV>"
}
resource "coralogix_events2metric" "logs2metric" {
name = "logs2metricExample"
description = "logs2metric from coralogix terraform provider"
logs_query = {
lucene = "remote_addr_enriched:/.*/"
applications = ["filter:startsWith:nginx"] //change here for existing applications from your account
severities = ["Debug"]
}
metric_fields = {
method = {
source_field = "method"
},
geo_point = {
source_field = "location_geopoint"
aggregations = {
max = {
enable = false
}
min = {
enable = false
}
avg = {
enable = true
}
}
}
}
metric_labels = {
Status = "status"
Path = "http_referer"
}
permutations = {
limit = 20000
}
}
resource "coralogix_events2metric" "spans2metric" {
name = "spans2metricExample"
description = "spans2metric from coralogix terraform provider"
spans_query = {
lucene = "remote_addr_enriched:/.*/"
applications = ["filter:startsWith:nginx"] //change here for existing applications from your account
actions = ["action-name"]
services = ["service-name"]
}
metric_fields = {
method = {
source_field = "method"
},
geo_point = {
source_field = "location_geopoint"
aggregations = {
max = {
enable = false
}
min = {
enable = false
}
avg = {
enable = true
}
}
}
}
metric_labels = {
Status = "status"
Path = "http_referer"
}
permutations = {
limit = 20000
}
}
name
(String) Events2Metric name. Events2Metric names have to be unique per account.
description
(String) Events2Metric description.logs_query
(Attributes) logs-events2metric type. Exactly one of "spans_query" or "logs_query" must be defined. (see below for nested schema)metric_fields
(Attributes Map) (see below for nested schema)metric_labels
(Map of String)permutations
(Attributes) Defines the permutations' info of the events2metric. (see below for nested schema)spans_query
(Attributes) spans-events2metric type. Exactly one of "spans_query" or "logs_query" should be defined. (see below for nested schema)
id
(String) The ID of this resource.
Optional:
applications
(Set of String) An array that contains log’s application names that we want to be alerted on. Applications can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxxlucene
(String) The search_query that we wanted to be notified on.severities
(Set of String) An array of severities that we interested in. Can be one of ["Critical" "Debug" "Error" "Info" "Unspecified" "Verbose" "Warning"]subsystems
(Set of String) An array that contains log’s subsystem names that we want to be notified on. Subsystems can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxx
Required:
source_field
(String)
Optional:
aggregations
(Attributes) (see below for nested schema)
Optional:
avg
(Attributes) (see below for nested schema)count
(Attributes) (see below for nested schema)histogram
(Attributes) (see below for nested schema)max
(Attributes) (see below for nested schema)min
(Attributes) (see below for nested schema)samples
(Attributes) (see below for nested schema)sum
(Attributes) (see below for nested schema)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Required:
buckets
(List of Number)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Required:
type
(String) Can be one of ["Max" "Min"].
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Optional:
enable
(Boolean)
Read-Only:
target_metric_name
(String)
Optional:
limit
(Number) Defines the permutations' limit of the events2metric.
Read-Only:
has_exceed_limit
(Boolean) Notify if the limit permutations' limit of the events2metric has exceed (computed).
Optional:
actions
(Set of String) An array that contains log’s actions names that we want to be notified on. Actions can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxxapplications
(Set of String) An array that contains log’s application names that we want to be alerted on. Applications can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxxlucene
(String) The search_query that we wanted to be notified on.services
(Set of String) An array that contains log’s services names that we want to be notified on. Services can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxxsubsystems
(Set of String) An array that contains log’s subsystem names that we want to be notified on. Subsystems can be filtered by prefix, suffix, and contains using the next patterns - filter:startsWith:xxx, filter:endsWith:xxx, filter:contains:xxx