Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron Threshold - issues setting variable #290

Open
markkelly-payroc opened this issue Jul 1, 2024 · 0 comments
Open

Cron Threshold - issues setting variable #290

markkelly-payroc opened this issue Jul 1, 2024 · 0 comments

Comments

@markkelly-payroc
Copy link

Hi team, we have code to setup a threshold monitor for cron but the value never seems to set. Can anyone see any issues

This is our code.

module "threshold_profile_us_cron_50m" {
source = "./payroc/threshold_profiles/threshold_profile_cron"
// (Required) Name of the profile
profile_name = "IAC - THRESHOLD - 50mCRON"
// (Required) Type of the profile - Denotes monitor type (eg) RESTAPI, SSL_CERT
type = "CRON"

cron_duration_alert = {
comparison_operator = 1
trouble = 3000
strategy = 1
polls_check = 1
}

cron_no_run_alert = {
severity = 0
strategy = 1
value = true
polls_check = 5
}

}

This is our module code main.tf

resource "site24x7_threshold_profile" "cron_threshold_profile_us" {
// (Required) Name of the profile
profile_name = var.profile_name
// (Required) Type of the profile - Denotes monitor type (eg) RESTAPI, SSL_CERT
type = var.type
// (Optional) Threshold profile types - https://www.site24x7.com/help/api/#threshold_profile_types
// 1 - Static Threshold, 2 - AI-based Threshold
profile_type = var.profile_type
cron_no_run_alert = var.cron_no_run_alert
cron_duration_alert = var.cron_duration_alert

}

our varibales.tf

CRON variables

variable "profile_name" {
type = string
description = "The Threshold name - lowercase"
}
variable "type" {
type = string
description = "The type of threshold profile url smtp ips port"
}

variable "profile_type" {
type = number
description = "Static Threshold(1) or AI-based Threshold(2)"
default = 1
}

variable "cron_no_run_alert" {
type = map(string)
description = "(Optional) ."
default = null
}

variable "cron_duration_alert" {
type = map(string)
description = "(Optional) ."
default = null
}

what i want to set
image

what it currently sets
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant