Skip to content

Commit 33f222f

Browse files
committed
SUMO-213711 updated slo monitor acceptance tests
1 parent 09cc930 commit 33f222f

File tree

1 file changed

+40
-1
lines changed

1 file changed

+40
-1
lines changed

sumologic/resource_sumologic_monitors_library_monitor_test.go

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,6 +1223,45 @@ func exampleSloMonitorWithTriggerCondition(
12231223
testName string,
12241224
trigger string) string {
12251225
var resourceText = fmt.Sprintf(`
1226+
resource "sumologic_slo" "slo_tf_window_metric_ratio" {
1227+
name = "%s"
1228+
description = "per minute login error rate over rolling 7 days"
1229+
parent_id = "0000000000000001"
1230+
signal_type = "Error"
1231+
service = "auth"
1232+
application = "login"
1233+
compliance {
1234+
compliance_type = "Rolling"
1235+
size = "7d"
1236+
target = 95
1237+
timezone = "Asia/Kolkata"
1238+
}
1239+
indicator {
1240+
window_based_evaluation {
1241+
op = "LessThan"
1242+
query_type = "Metrics"
1243+
size = "1m"
1244+
threshold = 99.0
1245+
queries {
1246+
query_group_type = "Unsuccessful"
1247+
query_group {
1248+
row_id = "A"
1249+
query = "service=auth api=login metric=HTTP_5XX_Count"
1250+
use_row_count = false
1251+
}
1252+
}
1253+
queries {
1254+
query_group_type = "Total"
1255+
query_group {
1256+
row_id = "A"
1257+
query = "service=auth api=login metric=TotalRequests"
1258+
use_row_count = false
1259+
}
1260+
}
1261+
}
1262+
}
1263+
}
1264+
12261265
resource "sumologic_monitor" "test" {
12271266
name = "%s"
12281267
description = "terraform_test_monitor_description"
@@ -1234,7 +1273,7 @@ resource "sumologic_monitor" "test" {
12341273
%s
12351274
}
12361275
playbook = "This is a test playbook"
1237-
}`, testName, trigger)
1276+
}`, testName, testName, trigger)
12381277
return resourceText
12391278
}
12401279

0 commit comments

Comments
 (0)