You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module"newrelic_nrql_alert_condition" {
source="./modules/newrelic/r/newrelic_nrql_alert_condition"# account_id - (optional) is a type of numberaccount_id=null# aggregation_window - (optional) is a type of numberaggregation_window=null# baseline_direction - (optional) is a type of stringbaseline_direction=null# close_violations_on_expiration - (optional) is a type of boolclose_violations_on_expiration=null# description - (optional) is a type of stringdescription=null# enabled - (optional) is a type of boolenabled=null# expected_groups - (optional) is a type of numberexpected_groups=null# expiration_duration - (optional) is a type of numberexpiration_duration=null# fill_option - (optional) is a type of stringfill_option=null# fill_value - (optional) is a type of numberfill_value=null# ignore_overlap - (optional) is a type of boolignore_overlap=null# name - (required) is a type of stringname=null# open_violation_on_expiration - (optional) is a type of boolopen_violation_on_expiration=null# open_violation_on_group_overlap - (optional) is a type of boolopen_violation_on_group_overlap=null# policy_id - (required) is a type of numberpolicy_id=null# runbook_url - (optional) is a type of stringrunbook_url=null# type - (optional) is a type of stringtype=null# value_function - (optional) is a type of stringvalue_function=null# violation_time_limit - (optional) is a type of stringviolation_time_limit=null# violation_time_limit_seconds - (optional) is a type of numberviolation_time_limit_seconds=nullcritical=[{
duration =null
operator =null
threshold =null
threshold_duration =null
threshold_occurrences =null
time_function =null
}]
nrql=[{
evaluation_offset =null
query =null
since_value =null
}]
term=[{
duration =null
operator =null
priority =null
threshold =null
threshold_duration =null
threshold_occurrences =null
time_function =null
}]
warning=[{
duration =null
operator =null
threshold =null
threshold_duration =null
threshold_occurrences =null
time_function =null
}]
}
variable"account_id" {
description="(optional) - The New Relic account ID for managing your NRQL alert conditions."type=numberdefault=null
}
variable"aggregation_window" {
description="(optional) - The duration of the time window used to evaluate the NRQL query, in seconds."type=numberdefault=null
}
variable"baseline_direction" {
description="(optional) - The baseline direction of a baseline NRQL alert condition. Valid values are: 'LOWER_ONLY', 'UPPER_AND_LOWER', 'UPPER_ONLY' (case insensitive)."type=stringdefault=null
}
variable"close_violations_on_expiration" {
description="(optional) - Whether to close all open violations when the signal expires."type=booldefault=null
}
variable"description" {
description="(optional) - The description of the NRQL alert condition."type=stringdefault=null
}
variable"enabled" {
description="(optional) - Whether or not to enable the alert condition."type=booldefault=null
}
variable"expected_groups" {
description="(optional) - Number of expected groups when using outlier detection."type=numberdefault=null
}
variable"expiration_duration" {
description="(optional) - The amount of time (in seconds) to wait before considering the signal expired."type=numberdefault=null
}
variable"fill_option" {
description="(optional) - Which strategy to use when filling gaps in the signal. If static, the 'fill value' will be used for filling gaps in the signal. Valid values are: 'NONE', 'LAST_VALUE', or 'STATIC' (case insensitive)."type=stringdefault=null
}
variable"fill_value" {
description="(optional) - If using the 'static' fill option, this value will be used for filling gaps in the signal."type=numberdefault=null
}
variable"ignore_overlap" {
description="(optional) - Whether to look for a convergence of groups when using outlier detection."type=booldefault=null
}
variable"name" {
description="(required) - The title of the condition."type=string
}
variable"open_violation_on_expiration" {
description="(optional) - Whether to create a new violation to capture that the signal expired."type=booldefault=null
}
variable"open_violation_on_group_overlap" {
description="(optional) - Whether overlapping groups should produce a violation."type=booldefault=null
}
variable"policy_id" {
description="(required) - The ID of the policy where this condition should be used."type=number
}
variable"runbook_url" {
description="(optional) - Runbook URL to display in notifications."type=stringdefault=null
}
variable"type" {
description="(optional) - The type of NRQL alert condition to create. Valid values are: 'static', 'outlier', 'baseline'."type=stringdefault=null
}
variable"value_function" {
description="(optional) - Valid values are: 'single_value' or 'sum'"type=stringdefault=null
}
variable"violation_time_limit" {
description="(optional) - Sets a time limit, in hours, that will automatically force-close a long-lasting violation after the time limit you select. Possible values are 'ONE_HOUR', 'TWO_HOURS', 'FOUR_HOURS', 'EIGHT_HOURS', 'TWELVE_HOURS', 'TWENTY_FOUR_HOURS', 'THIRTY_DAYS' (case insensitive)."type=stringdefault=null
}
variable"violation_time_limit_seconds" {
description="(optional) - Sets a time limit, in seconds, that will automatically force-close a long-lasting violation after the time limit you select. Must be in the range of 300 to 2592000 (inclusive)"type=numberdefault=null
}
variable"critical" {
description="nested block: NestingList, min items: 0, max items: 1"type=set(object(
{
duration =number
operator =string
threshold =number
threshold_duration =number
threshold_occurrences =string
time_function =string
}
))
default=[]
}
variable"nrql" {
description="nested block: NestingList, min items: 1, max items: 1"type=set(object(
{
evaluation_offset =number
query =string
since_value =string
}
))
}
variable"term" {
description="nested block: NestingSet, min items: 0, max items: 2"type=set(object(
{
duration =number
operator =string
priority =string
threshold =number
threshold_duration =number
threshold_occurrences =string
time_function =string
}
))
default=[]
}
variable"warning" {
description="nested block: NestingList, min items: 0, max items: 1"type=set(object(
{
duration =number
operator =string
threshold =number
threshold_duration =number
threshold_occurrences =string
time_function =string
}
))
default=[]
}
resource"newrelic_nrql_alert_condition""this" {
# account_id - (optional) is a type of numberaccount_id=var.account_id# aggregation_window - (optional) is a type of numberaggregation_window=var.aggregation_window# baseline_direction - (optional) is a type of stringbaseline_direction=var.baseline_direction# close_violations_on_expiration - (optional) is a type of boolclose_violations_on_expiration=var.close_violations_on_expiration# description - (optional) is a type of stringdescription=var.description# enabled - (optional) is a type of boolenabled=var.enabled# expected_groups - (optional) is a type of numberexpected_groups=var.expected_groups# expiration_duration - (optional) is a type of numberexpiration_duration=var.expiration_duration# fill_option - (optional) is a type of stringfill_option=var.fill_option# fill_value - (optional) is a type of numberfill_value=var.fill_value# ignore_overlap - (optional) is a type of boolignore_overlap=var.ignore_overlap# name - (required) is a type of stringname=var.name# open_violation_on_expiration - (optional) is a type of boolopen_violation_on_expiration=var.open_violation_on_expiration# open_violation_on_group_overlap - (optional) is a type of boolopen_violation_on_group_overlap=var.open_violation_on_group_overlap# policy_id - (required) is a type of numberpolicy_id=var.policy_id# runbook_url - (optional) is a type of stringrunbook_url=var.runbook_url# type - (optional) is a type of stringtype=var.type# value_function - (optional) is a type of stringvalue_function=var.value_function# violation_time_limit - (optional) is a type of stringviolation_time_limit=var.violation_time_limit# violation_time_limit_seconds - (optional) is a type of numberviolation_time_limit_seconds=var.violation_time_limit_secondsdynamic"critical" {
for_each=var.criticalcontent {
# duration - (optional) is a type of numberduration=critical.value["duration"]
# operator - (optional) is a type of stringoperator=critical.value["operator"]
# threshold - (required) is a type of numberthreshold=critical.value["threshold"]
# threshold_duration - (optional) is a type of numberthreshold_duration=critical.value["threshold_duration"]
# threshold_occurrences - (optional) is a type of stringthreshold_occurrences=critical.value["threshold_occurrences"]
# time_function - (optional) is a type of stringtime_function=critical.value["time_function"]
}
}
dynamic"nrql" {
for_each=var.nrqlcontent {
# evaluation_offset - (optional) is a type of numberevaluation_offset=nrql.value["evaluation_offset"]
# query - (required) is a type of stringquery=nrql.value["query"]
# since_value - (optional) is a type of stringsince_value=nrql.value["since_value"]
}
}
dynamic"term" {
for_each=var.termcontent {
# duration - (optional) is a type of numberduration=term.value["duration"]
# operator - (optional) is a type of stringoperator=term.value["operator"]
# priority - (optional) is a type of stringpriority=term.value["priority"]
# threshold - (required) is a type of numberthreshold=term.value["threshold"]
# threshold_duration - (optional) is a type of numberthreshold_duration=term.value["threshold_duration"]
# threshold_occurrences - (optional) is a type of stringthreshold_occurrences=term.value["threshold_occurrences"]
# time_function - (optional) is a type of stringtime_function=term.value["time_function"]
}
}
dynamic"warning" {
for_each=var.warningcontent {
# duration - (optional) is a type of numberduration=warning.value["duration"]
# operator - (optional) is a type of stringoperator=warning.value["operator"]
# threshold - (required) is a type of numberthreshold=warning.value["threshold"]
# threshold_duration - (optional) is a type of numberthreshold_duration=warning.value["threshold_duration"]
# threshold_occurrences - (optional) is a type of stringthreshold_occurrences=warning.value["threshold_occurrences"]
# time_function - (optional) is a type of stringtime_function=warning.value["time_function"]
}
}
}