-
Notifications
You must be signed in to change notification settings - Fork 1
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
[sc-119944] add logging query to monitor #98
Conversation
925c6cf
to
3e26bb4
Compare
7ac25a8
to
c29b210
Compare
c29b210
to
7296d0d
Compare
CHANGELOG.md
Outdated
@@ -2,6 +2,9 @@ | |||
|
|||
## Unreleased | |||
|
|||
## 1.6.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we typically set the version as part of releasing, depending on what changes. since this is a new feature, we will want to bump the minor.
## 1.6.3 |
CHANGELOG.md
Outdated
@@ -2,6 +2,9 @@ | |||
|
|||
## Unreleased | |||
|
|||
## 1.6.3 | |||
- Implemented support for logging query in the `monitorv1` resource. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Implemented support for logging query in the `monitorv1` resource. | |
Added: | |
- Implemented support for logging query in the `chronosphere_monitor` resource. |
examples/monitors-signals/main.tf
Outdated
@@ -55,3 +55,59 @@ resource "chronosphere_monitor" "monitor_with_signal" { | |||
} | |||
} | |||
} | |||
|
|||
resource "chronosphere_monitor" "monitor_with_logging_query" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would prefer if this was in a new directory, examples/monitor-logging
, as the goal isn't to test monitor with signals but logging queries
examples/monitors-signals/main.tf
Outdated
signal_grouping { | ||
label_names = ["kubernetes_namespace"] | ||
} | ||
series_conditions { | ||
condition { | ||
severity = "warn" | ||
value = 20 | ||
op = "GT" | ||
} | ||
|
||
override { | ||
label_matcher { | ||
name = "app" | ||
type = "EXACT_MATCHER_TYPE" | ||
value = "dbmon" | ||
} | ||
|
||
condition { | ||
severity = "critical" | ||
value = 1.0 | ||
op = "GT" | ||
sustain = "60s" | ||
resolve_sustain = "30s" | ||
} | ||
} | ||
} | ||
|
||
labels = { | ||
"team" = "my team" | ||
} | ||
annotations = { | ||
"runbook" = "go/runbook" | ||
} | ||
|
||
schedule { | ||
timezone = "UTC" | ||
|
||
dynamic "range" { | ||
for_each = toset(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]) | ||
content { | ||
day = range.key | ||
start = "07:00" | ||
end = "20:00" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strip down the monitor to a minimal config since goal is to test logging queries
signal_grouping { | |
label_names = ["kubernetes_namespace"] | |
} | |
series_conditions { | |
condition { | |
severity = "warn" | |
value = 20 | |
op = "GT" | |
} | |
override { | |
label_matcher { | |
name = "app" | |
type = "EXACT_MATCHER_TYPE" | |
value = "dbmon" | |
} | |
condition { | |
severity = "critical" | |
value = 1.0 | |
op = "GT" | |
sustain = "60s" | |
resolve_sustain = "30s" | |
} | |
} | |
} | |
labels = { | |
"team" = "my team" | |
} | |
annotations = { | |
"runbook" = "go/runbook" | |
} | |
schedule { | |
timezone = "UTC" | |
dynamic "range" { | |
for_each = toset(["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]) | |
content { | |
day = range.key | |
start = "07:00" | |
end = "20:00" | |
} | |
} | |
} | |
series_conditions { | |
condition { | |
severity = "warn" | |
value = 20 | |
op = "GT" | |
} | |
} |
e4ba72a
to
e5f2c43
Compare
8837c4c
to
724e4aa
Compare
724e4aa
to
6070677
Compare
https://buildkite.com/chronosphere/terraform-provider-scenarios-tests-oss/builds/27#_