sumologic.Monitor
Explore with Pulumi AI
Provides the ability to create, read, delete, and update Monitors. If Fine Grain Permission (FGP) feature is enabled with Monitors Content at one’s Sumo Logic account, one can also set those permission details under this monitor resource. For further details about FGP, please see this Monitor Permission document.
Example Logs Monitor with FGP
NOTE:
obj_permission
are added at one of the monitor’s to showcase how Fine Grain Permissions (FGP) are associated with two roles.
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfTestRole01 = new sumologic.Role("tfTestRole01", {
description: "Testing resource sumologic_role",
capabilities: [
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
],
});
const tfTestRole02 = new sumologic.Role("tfTestRole02", {
description: "Testing resource sumologic_role",
capabilities: [
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
],
});
const tfLogsMonitor1 = new sumologic.Monitor("tfLogsMonitor1", {
description: "tf logs monitor",
type: "MonitorsLibraryMonitor",
isDisabled: false,
contentType: "Monitor",
monitorType: "Logs",
evaluationDelay: "5m",
tags: {
team: "monitoring",
application: "sumologic",
},
queries: [{
rowId: "A",
query: "_sourceCategory=event-action info",
}],
triggerConditions: {
logsStaticCondition: {
critical: {
timeRange: "15m",
frequency: "5m",
alert: {
threshold: 40,
thresholdType: "GreaterThan",
},
resolution: {
threshold: 40,
thresholdType: "LessThanOrEqual",
},
},
},
},
notifications: [
{
notification: {
connectionType: "Email",
recipients: ["abc@example.com"],
subject: "Monitor Alert: {{TriggerType}} on {{Name}}",
timeZone: "PST",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
{
notification: {
connectionType: "Webhook",
connectionId: "0000000000ABC123",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
],
playbook: "{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered.",
alertName: "Alert {{ResultJson.my_field}} from {{Name}}",
notificationGroupFields: ["_sourceHost"],
objPermissions: [
{
subjectType: "role",
subjectId: tfTestRole01.roleId,
permissions: [
"Read",
"Update",
],
},
{
subjectType: "role",
subjectId: tfTestRole02.roleId,
permissions: ["Read"],
},
],
});
import pulumi
import pulumi_sumologic as sumologic
tf_test_role01 = sumologic.Role("tfTestRole01",
description="Testing resource sumologic_role",
capabilities=[
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
])
tf_test_role02 = sumologic.Role("tfTestRole02",
description="Testing resource sumologic_role",
capabilities=[
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
])
tf_logs_monitor1 = sumologic.Monitor("tfLogsMonitor1",
description="tf logs monitor",
type="MonitorsLibraryMonitor",
is_disabled=False,
content_type="Monitor",
monitor_type="Logs",
evaluation_delay="5m",
tags={
"team": "monitoring",
"application": "sumologic",
},
queries=[{
"row_id": "A",
"query": "_sourceCategory=event-action info",
}],
trigger_conditions={
"logs_static_condition": {
"critical": {
"time_range": "15m",
"frequency": "5m",
"alert": {
"threshold": 40,
"threshold_type": "GreaterThan",
},
"resolution": {
"threshold": 40,
"threshold_type": "LessThanOrEqual",
},
},
},
},
notifications=[
{
"notification": {
"connection_type": "Email",
"recipients": ["abc@example.com"],
"subject": "Monitor Alert: {{TriggerType}} on {{Name}}",
"time_zone": "PST",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
{
"notification": {
"connection_type": "Webhook",
"connection_id": "0000000000ABC123",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
],
playbook="{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered.",
alert_name="Alert {{ResultJson.my_field}} from {{Name}}",
notification_group_fields=["_sourceHost"],
obj_permissions=[
{
"subject_type": "role",
"subject_id": tf_test_role01.role_id,
"permissions": [
"Read",
"Update",
],
},
{
"subject_type": "role",
"subject_id": tf_test_role02.role_id,
"permissions": ["Read"],
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tfTestRole01, err := sumologic.NewRole(ctx, "tfTestRole01", &sumologic.RoleArgs{
Description: pulumi.String("Testing resource sumologic_role"),
Capabilities: pulumi.StringArray{
pulumi.String("viewAlerts"),
pulumi.String("viewMonitorsV2"),
pulumi.String("manageMonitorsV2"),
},
})
if err != nil {
return err
}
tfTestRole02, err := sumologic.NewRole(ctx, "tfTestRole02", &sumologic.RoleArgs{
Description: pulumi.String("Testing resource sumologic_role"),
Capabilities: pulumi.StringArray{
pulumi.String("viewAlerts"),
pulumi.String("viewMonitorsV2"),
pulumi.String("manageMonitorsV2"),
},
})
if err != nil {
return err
}
_, err = sumologic.NewMonitor(ctx, "tfLogsMonitor1", &sumologic.MonitorArgs{
Description: pulumi.String("tf logs monitor"),
Type: pulumi.String("MonitorsLibraryMonitor"),
IsDisabled: pulumi.Bool(false),
ContentType: pulumi.String("Monitor"),
MonitorType: pulumi.String("Logs"),
EvaluationDelay: pulumi.String("5m"),
Tags: pulumi.StringMap{
"team": pulumi.String("monitoring"),
"application": pulumi.String("sumologic"),
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
RowId: pulumi.String("A"),
Query: pulumi.String("_sourceCategory=event-action info"),
},
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
LogsStaticCondition: &sumologic.MonitorTriggerConditionsLogsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalArgs{
TimeRange: pulumi.String("15m"),
Frequency: pulumi.String("5m"),
Alert: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("GreaterThan"),
},
Resolution: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("LessThanOrEqual"),
},
},
},
},
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
Recipients: pulumi.StringArray{
pulumi.String("abc@example.com"),
},
Subject: pulumi.String("Monitor Alert: {{TriggerType}} on {{Name}}"),
TimeZone: pulumi.String("PST"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Webhook"),
ConnectionId: pulumi.String("0000000000ABC123"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Playbook: pulumi.String("{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered."),
AlertName: pulumi.String("Alert {{ResultJson.my_field}} from {{Name}}"),
NotificationGroupFields: pulumi.StringArray{
pulumi.String("_sourceHost"),
},
ObjPermissions: sumologic.MonitorObjPermissionArray{
&sumologic.MonitorObjPermissionArgs{
SubjectType: pulumi.String("role"),
SubjectId: tfTestRole01.RoleId,
Permissions: pulumi.StringArray{
pulumi.String("Read"),
pulumi.String("Update"),
},
},
&sumologic.MonitorObjPermissionArgs{
SubjectType: pulumi.String("role"),
SubjectId: tfTestRole02.RoleId,
Permissions: pulumi.StringArray{
pulumi.String("Read"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfTestRole01 = new Sumologic.Role("tfTestRole01", new()
{
Description = "Testing resource sumologic_role",
Capabilities = new[]
{
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
},
});
var tfTestRole02 = new Sumologic.Role("tfTestRole02", new()
{
Description = "Testing resource sumologic_role",
Capabilities = new[]
{
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2",
},
});
var tfLogsMonitor1 = new Sumologic.Monitor("tfLogsMonitor1", new()
{
Description = "tf logs monitor",
Type = "MonitorsLibraryMonitor",
IsDisabled = false,
ContentType = "Monitor",
MonitorType = "Logs",
EvaluationDelay = "5m",
Tags =
{
{ "team", "monitoring" },
{ "application", "sumologic" },
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
RowId = "A",
Query = "_sourceCategory=event-action info",
},
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
LogsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalArgs
{
TimeRange = "15m",
Frequency = "5m",
Alert = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs
{
Threshold = 40,
ThresholdType = "GreaterThan",
},
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs
{
Threshold = 40,
ThresholdType = "LessThanOrEqual",
},
},
},
},
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
Recipients = new[]
{
"abc@example.com",
},
Subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
TimeZone = "PST",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Webhook",
ConnectionId = "0000000000ABC123",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Playbook = "{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered.",
AlertName = "Alert {{ResultJson.my_field}} from {{Name}}",
NotificationGroupFields = new[]
{
"_sourceHost",
},
ObjPermissions = new[]
{
new Sumologic.Inputs.MonitorObjPermissionArgs
{
SubjectType = "role",
SubjectId = tfTestRole01.RoleId,
Permissions = new[]
{
"Read",
"Update",
},
},
new Sumologic.Inputs.MonitorObjPermissionArgs
{
SubjectType = "role",
SubjectId = tfTestRole02.RoleId,
Permissions = new[]
{
"Read",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Role;
import com.pulumi.sumologic.RoleArgs;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorObjPermissionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfTestRole01 = new Role("tfTestRole01", RoleArgs.builder()
.description("Testing resource sumologic_role")
.capabilities(
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2")
.build());
var tfTestRole02 = new Role("tfTestRole02", RoleArgs.builder()
.description("Testing resource sumologic_role")
.capabilities(
"viewAlerts",
"viewMonitorsV2",
"manageMonitorsV2")
.build());
var tfLogsMonitor1 = new Monitor("tfLogsMonitor1", MonitorArgs.builder()
.description("tf logs monitor")
.type("MonitorsLibraryMonitor")
.isDisabled(false)
.contentType("Monitor")
.monitorType("Logs")
.evaluationDelay("5m")
.tags(Map.ofEntries(
Map.entry("team", "monitoring"),
Map.entry("application", "sumologic")
))
.queries(MonitorQueryArgs.builder()
.rowId("A")
.query("_sourceCategory=event-action info")
.build())
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.logsStaticCondition(MonitorTriggerConditionsLogsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsLogsStaticConditionCriticalArgs.builder()
.timeRange("15m")
.frequency("5m")
.alert(MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs.builder()
.threshold(40)
.thresholdType("GreaterThan")
.build())
.resolution(MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs.builder()
.threshold(40)
.thresholdType("LessThanOrEqual")
.build())
.build())
.build())
.build())
.notifications(
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.recipients("abc@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build(),
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Webhook")
.connectionId("0000000000ABC123")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.playbook("{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered.")
.alertName("Alert {{ResultJson.my_field}} from {{Name}}")
.notificationGroupFields("_sourceHost")
.objPermissions(
MonitorObjPermissionArgs.builder()
.subjectType("role")
.subjectId(tfTestRole01.roleId())
.permissions(
"Read",
"Update")
.build(),
MonitorObjPermissionArgs.builder()
.subjectType("role")
.subjectId(tfTestRole02.roleId())
.permissions("Read")
.build())
.build());
}
}
resources:
tfTestRole01:
type: sumologic:Role
properties:
description: Testing resource sumologic_role
capabilities:
- viewAlerts
- viewMonitorsV2
- manageMonitorsV2
tfTestRole02:
type: sumologic:Role
properties:
description: Testing resource sumologic_role
capabilities:
- viewAlerts
- viewMonitorsV2
- manageMonitorsV2
tfLogsMonitor1:
type: sumologic:Monitor
properties:
description: tf logs monitor
type: MonitorsLibraryMonitor
isDisabled: false
contentType: Monitor
monitorType: Logs
evaluationDelay: 5m
tags:
team: monitoring
application: sumologic
queries:
- rowId: A
query: _sourceCategory=event-action info
triggerConditions:
logsStaticCondition:
critical:
timeRange: 15m
frequency: 5m
alert:
threshold: 40
thresholdType: GreaterThan
resolution:
threshold: 40
thresholdType: LessThanOrEqual
notifications:
- notification:
connectionType: Email
recipients:
- abc@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
runForTriggerTypes:
- Critical
- ResolvedCritical
- notification:
connectionType: Webhook
connectionId: 0000000000ABC123
runForTriggerTypes:
- Critical
- ResolvedCritical
playbook: '{{Name}} should be fixed in 24 hours when {{TriggerType}} is triggered.'
alertName: Alert {{ResultJson.my_field}} from {{Name}}
notificationGroupFields:
- _sourceHost
objPermissions:
- subjectType: role
subjectId: ${tfTestRole01.roleId}
permissions:
- Read
- Update
- subjectType: role
subjectId: ${tfTestRole02.roleId}
permissions:
- Read
Example Metrics Monitor
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfMetricsMonitor1 = new sumologic.Monitor("tfMetricsMonitor1", {
contentType: "Monitor",
description: "tf metrics monitor",
evaluationDelay: "1m",
isDisabled: false,
monitorType: "Metrics",
notificationGroupFields: ["metric"],
notifications: [{
notification: {
connectionType: "Email",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
recipients: ["abc@example.com"],
subject: "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
timeZone: "PST",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
}],
playbook: "test playbook",
queries: [{
query: "metric=CPU* _sourceCategory=event-action",
rowId: "A",
}],
tags: {
application: "sumologic",
team: "monitoring",
},
triggerConditions: {
metricsStaticCondition: {
critical: {
alert: {
minDataPoints: 5,
threshold: 40,
thresholdType: "GreaterThan",
},
occurrenceType: "Always",
resolution: {
threshold: 40,
thresholdType: "LessThanOrEqual",
},
timeRange: "15m",
},
},
},
type: "MonitorsLibraryMonitor",
});
import pulumi
import pulumi_sumologic as sumologic
tf_metrics_monitor1 = sumologic.Monitor("tfMetricsMonitor1",
content_type="Monitor",
description="tf metrics monitor",
evaluation_delay="1m",
is_disabled=False,
monitor_type="Metrics",
notification_group_fields=["metric"],
notifications=[{
"notification": {
"connection_type": "Email",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
"recipients": ["abc@example.com"],
"subject": "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
"time_zone": "PST",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
}],
playbook="test playbook",
queries=[{
"query": "metric=CPU* _sourceCategory=event-action",
"row_id": "A",
}],
tags={
"application": "sumologic",
"team": "monitoring",
},
trigger_conditions={
"metrics_static_condition": {
"critical": {
"alert": {
"min_data_points": 5,
"threshold": 40,
"threshold_type": "GreaterThan",
},
"occurrence_type": "Always",
"resolution": {
"threshold": 40,
"threshold_type": "LessThanOrEqual",
},
"time_range": "15m",
},
},
},
type="MonitorsLibraryMonitor")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sumologic.NewMonitor(ctx, "tfMetricsMonitor1", &sumologic.MonitorArgs{
ContentType: pulumi.String("Monitor"),
Description: pulumi.String("tf metrics monitor"),
EvaluationDelay: pulumi.String("1m"),
IsDisabled: pulumi.Bool(false),
MonitorType: pulumi.String("Metrics"),
NotificationGroupFields: pulumi.StringArray{
pulumi.String("metric"),
},
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
Recipients: pulumi.StringArray{
pulumi.String("abc@example.com"),
},
Subject: pulumi.String("Triggered {{TriggerType}} Alert on Monitor {{Name}}"),
TimeZone: pulumi.String("PST"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Playbook: pulumi.String("test playbook"),
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("metric=CPU* _sourceCategory=event-action"),
RowId: pulumi.String("A"),
},
},
Tags: pulumi.StringMap{
"application": pulumi.String("sumologic"),
"team": pulumi.String("monitoring"),
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
MetricsStaticCondition: &sumologic.MonitorTriggerConditionsMetricsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs{
Alert: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs{
MinDataPoints: pulumi.Float64(5),
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("GreaterThan"),
},
OccurrenceType: pulumi.String("Always"),
Resolution: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("LessThanOrEqual"),
},
TimeRange: pulumi.String("15m"),
},
},
},
Type: pulumi.String("MonitorsLibraryMonitor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfMetricsMonitor1 = new Sumologic.Monitor("tfMetricsMonitor1", new()
{
ContentType = "Monitor",
Description = "tf metrics monitor",
EvaluationDelay = "1m",
IsDisabled = false,
MonitorType = "Metrics",
NotificationGroupFields = new[]
{
"metric",
},
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
Recipients = new[]
{
"abc@example.com",
},
Subject = "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
TimeZone = "PST",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Playbook = "test playbook",
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "metric=CPU* _sourceCategory=event-action",
RowId = "A",
},
},
Tags =
{
{ "application", "sumologic" },
{ "team", "monitoring" },
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
MetricsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs
{
MinDataPoints = 5,
Threshold = 40,
ThresholdType = "GreaterThan",
},
OccurrenceType = "Always",
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs
{
Threshold = 40,
ThresholdType = "LessThanOrEqual",
},
TimeRange = "15m",
},
},
},
Type = "MonitorsLibraryMonitor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfMetricsMonitor1 = new Monitor("tfMetricsMonitor1", MonitorArgs.builder()
.contentType("Monitor")
.description("tf metrics monitor")
.evaluationDelay("1m")
.isDisabled(false)
.monitorType("Metrics")
.notificationGroupFields("metric")
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("abc@example.com")
.subject("Triggered {{TriggerType}} Alert on Monitor {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.playbook("test playbook")
.queries(MonitorQueryArgs.builder()
.query("metric=CPU* _sourceCategory=event-action")
.rowId("A")
.build())
.tags(Map.ofEntries(
Map.entry("application", "sumologic"),
Map.entry("team", "monitoring")
))
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.metricsStaticCondition(MonitorTriggerConditionsMetricsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsMetricsStaticConditionCriticalArgs.builder()
.alert(MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs.builder()
.minDataPoints(5)
.threshold(40)
.thresholdType("GreaterThan")
.build())
.occurrenceType("Always")
.resolution(MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs.builder()
.threshold(40)
.thresholdType("LessThanOrEqual")
.build())
.timeRange("15m")
.build())
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfMetricsMonitor1:
type: sumologic:Monitor
properties:
contentType: Monitor
description: tf metrics monitor
evaluationDelay: 1m
isDisabled: false
monitorType: Metrics
notificationGroupFields:
- metric
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- abc@example.com
subject: Triggered {{TriggerType}} Alert on Monitor {{Name}}
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
playbook: test playbook
queries:
- query: metric=CPU* _sourceCategory=event-action
rowId: A
tags:
application: sumologic
team: monitoring
triggerConditions:
metricsStaticCondition:
critical:
alert:
minDataPoints: 5
threshold: 40
thresholdType: GreaterThan
occurrenceType: Always
resolution:
threshold: 40
thresholdType: LessThanOrEqual
timeRange: 15m
type: MonitorsLibraryMonitor
Example SLO Monitors
Example coming soon!
Example coming soon!
Example coming soon!
Example coming soon!
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloSliConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloSliConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloSliConditionWarningArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloBurnRateConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloBurnRateConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsSloBurnRateConditionWarningArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfSloMonitor1 = new Monitor("tfSloMonitor1", MonitorArgs.builder()
.contentType("Monitor")
.evaluationDelay("5m")
.isDisabled(false)
.monitorType("Slo")
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("abc@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.playbook("test playbook")
.sloId("0000000000000009")
.tags(Map.ofEntries(
Map.entry("application", "sumologic"),
Map.entry("team", "monitoring")
))
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.sloSliCondition(MonitorTriggerConditionsSloSliConditionArgs.builder()
.critical(MonitorTriggerConditionsSloSliConditionCriticalArgs.builder()
.sliThreshold(99.5)
.build())
.warning(MonitorTriggerConditionsSloSliConditionWarningArgs.builder()
.sliThreshold(99.9)
.build())
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
var tfSloMonitor2 = new Monitor("tfSloMonitor2", MonitorArgs.builder()
.contentType("Monitor")
.evaluationDelay("5m")
.isDisabled(false)
.monitorType("Slo")
.sloId("0000000000000009")
.tags(Map.ofEntries(
Map.entry("application", "sumologic"),
Map.entry("team", "monitoring")
))
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.sloBurnRateCondition(MonitorTriggerConditionsSloBurnRateConditionArgs.builder()
.critical(MonitorTriggerConditionsSloBurnRateConditionCriticalArgs.builder()
.burnRate(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.warning(MonitorTriggerConditionsSloBurnRateConditionWarningArgs.builder()
.burnRate(
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference),
%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
.build())
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfSloMonitor1:
type: sumologic:Monitor
properties:
contentType: Monitor
evaluationDelay: 5m
isDisabled: false
monitorType: Slo
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- abc@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
playbook: test playbook
sloId: '0000000000000009'
tags:
application: sumologic
team: monitoring
triggerConditions:
sloSliCondition:
critical:
sliThreshold: 99.5
warning:
sliThreshold: 99.9
type: MonitorsLibraryMonitor
tfSloMonitor2:
type: sumologic:Monitor
properties:
contentType: Monitor
evaluationDelay: 5m
isDisabled: false
monitorType: Slo
sloId: '0000000000000009'
tags:
application: sumologic
team: monitoring
triggerConditions:
sloBurnRateCondition:
critical:
burnRate:
- burnRateThreshold: 50
timeRange: 1d
warning:
burnRate:
- burnRateThreshold: 30
timeRange: 3d
- burnRateThreshold: 20
timeRange: 4d
type: MonitorsLibraryMonitor
Example Logs Monitor with Webhook Connection and Folder
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfMonitorFolder1 = new sumologic.MonitorFolder("tfMonitorFolder1", {description: "A folder for Monitors"});
const examplePagerdutyConnection = new sumologic.Connection("examplePagerdutyConnection", {
description: "PagerDuty connection for notifications from Monitors",
type: "WebhookConnection",
webhookType: "PagerDuty",
url: "https://events.pagerduty.com/",
defaultPayload: `{
"service_key": "pagerduty_api_integration_key",
"event_type": "trigger",
"description": "PagerDuty connection for notifications",
"client": "Sumo Logic",
"client_url": ""
}
`,
});
const tfLogsMonitor2 = new sumologic.Monitor("tfLogsMonitor2", {
description: "tf logs monitor with webhook",
type: "MonitorsLibraryMonitor",
parentId: tfMonitorFolder1.monitorFolderId,
isDisabled: false,
contentType: "Monitor",
monitorType: "Logs",
tags: {
team: "monitoring",
application: "sumologic",
},
queries: [{
rowId: "A",
query: "_sourceCategory=event-action info",
}],
triggerConditions: {
logsStaticCondition: {
critical: {
timeRange: "15m",
frequency: "5m",
alert: {
threshold: 40,
thresholdType: "GreaterThan",
},
resolution: {
threshold: 40,
thresholdType: "LessThanOrEqual",
resolutionWindow: "5m",
},
},
},
},
notifications: [
{
notification: {
connectionType: "Email",
recipients: ["abc@example.com"],
subject: "Monitor Alert: {{TriggerType}} on {{Name}}",
timeZone: "PST",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
{
notification: {
connectionType: "PagerDuty",
connectionId: examplePagerdutyConnection.connectionId,
payloadOverride: `{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
JSON,
resolutionPayloadOverride = <<JSON
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
`,
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
],
});
import pulumi
import pulumi_sumologic as sumologic
tf_monitor_folder1 = sumologic.MonitorFolder("tfMonitorFolder1", description="A folder for Monitors")
example_pagerduty_connection = sumologic.Connection("examplePagerdutyConnection",
description="PagerDuty connection for notifications from Monitors",
type="WebhookConnection",
webhook_type="PagerDuty",
url="https://events.pagerduty.com/",
default_payload="""{
"service_key": "pagerduty_api_integration_key",
"event_type": "trigger",
"description": "PagerDuty connection for notifications",
"client": "Sumo Logic",
"client_url": ""
}
""")
tf_logs_monitor2 = sumologic.Monitor("tfLogsMonitor2",
description="tf logs monitor with webhook",
type="MonitorsLibraryMonitor",
parent_id=tf_monitor_folder1.monitor_folder_id,
is_disabled=False,
content_type="Monitor",
monitor_type="Logs",
tags={
"team": "monitoring",
"application": "sumologic",
},
queries=[{
"row_id": "A",
"query": "_sourceCategory=event-action info",
}],
trigger_conditions={
"logs_static_condition": {
"critical": {
"time_range": "15m",
"frequency": "5m",
"alert": {
"threshold": 40,
"threshold_type": "GreaterThan",
},
"resolution": {
"threshold": 40,
"threshold_type": "LessThanOrEqual",
"resolution_window": "5m",
},
},
},
},
notifications=[
{
"notification": {
"connection_type": "Email",
"recipients": ["abc@example.com"],
"subject": "Monitor Alert: {{TriggerType}} on {{Name}}",
"time_zone": "PST",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
{
"notification": {
"connection_type": "PagerDuty",
"connection_id": example_pagerduty_connection.connection_id,
"payload_override": """{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
JSON,
resolutionPayloadOverride = <<JSON
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
""",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
tfMonitorFolder1, err := sumologic.NewMonitorFolder(ctx, "tfMonitorFolder1", &sumologic.MonitorFolderArgs{
Description: pulumi.String("A folder for Monitors"),
})
if err != nil {
return err
}
examplePagerdutyConnection, err := sumologic.NewConnection(ctx, "examplePagerdutyConnection", &sumologic.ConnectionArgs{
Description: pulumi.String("PagerDuty connection for notifications from Monitors"),
Type: pulumi.String("WebhookConnection"),
WebhookType: pulumi.String("PagerDuty"),
Url: pulumi.String("https://events.pagerduty.com/"),
DefaultPayload: pulumi.String(`{
"service_key": "pagerduty_api_integration_key",
"event_type": "trigger",
"description": "PagerDuty connection for notifications",
"client": "Sumo Logic",
"client_url": ""
}
`),
})
if err != nil {
return err
}
_, err = sumologic.NewMonitor(ctx, "tfLogsMonitor2", &sumologic.MonitorArgs{
Description: pulumi.String("tf logs monitor with webhook"),
Type: pulumi.String("MonitorsLibraryMonitor"),
ParentId: tfMonitorFolder1.MonitorFolderId,
IsDisabled: pulumi.Bool(false),
ContentType: pulumi.String("Monitor"),
MonitorType: pulumi.String("Logs"),
Tags: pulumi.StringMap{
"team": pulumi.String("monitoring"),
"application": pulumi.String("sumologic"),
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
RowId: pulumi.String("A"),
Query: pulumi.String("_sourceCategory=event-action info"),
},
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
LogsStaticCondition: &sumologic.MonitorTriggerConditionsLogsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalArgs{
TimeRange: pulumi.String("15m"),
Frequency: pulumi.String("5m"),
Alert: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("GreaterThan"),
},
Resolution: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("LessThanOrEqual"),
ResolutionWindow: pulumi.String("5m"),
},
},
},
},
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
Recipients: pulumi.StringArray{
pulumi.String("abc@example.com"),
},
Subject: pulumi.String("Monitor Alert: {{TriggerType}} on {{Name}}"),
TimeZone: pulumi.String("PST"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("PagerDuty"),
ConnectionId: examplePagerdutyConnection.ConnectionId,
PayloadOverride: pulumi.String(`{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
JSON,
resolutionPayloadOverride = <<JSON
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
`),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfMonitorFolder1 = new Sumologic.MonitorFolder("tfMonitorFolder1", new()
{
Description = "A folder for Monitors",
});
var examplePagerdutyConnection = new Sumologic.Connection("examplePagerdutyConnection", new()
{
Description = "PagerDuty connection for notifications from Monitors",
Type = "WebhookConnection",
WebhookType = "PagerDuty",
Url = "https://events.pagerduty.com/",
DefaultPayload = @"{
""service_key"": ""pagerduty_api_integration_key"",
""event_type"": ""trigger"",
""description"": ""PagerDuty connection for notifications"",
""client"": ""Sumo Logic"",
""client_url"": """"
}
",
});
var tfLogsMonitor2 = new Sumologic.Monitor("tfLogsMonitor2", new()
{
Description = "tf logs monitor with webhook",
Type = "MonitorsLibraryMonitor",
ParentId = tfMonitorFolder1.MonitorFolderId,
IsDisabled = false,
ContentType = "Monitor",
MonitorType = "Logs",
Tags =
{
{ "team", "monitoring" },
{ "application", "sumologic" },
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
RowId = "A",
Query = "_sourceCategory=event-action info",
},
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
LogsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalArgs
{
TimeRange = "15m",
Frequency = "5m",
Alert = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs
{
Threshold = 40,
ThresholdType = "GreaterThan",
},
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs
{
Threshold = 40,
ThresholdType = "LessThanOrEqual",
ResolutionWindow = "5m",
},
},
},
},
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
Recipients = new[]
{
"abc@example.com",
},
Subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
TimeZone = "PST",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "PagerDuty",
ConnectionId = examplePagerdutyConnection.ConnectionId,
PayloadOverride = @"{
""service_key"": ""your_pagerduty_api_integration_key"",
""event_type"": ""trigger"",
""description"": ""Alert: Triggered {{TriggerType}} for Monitor {{Name}}"",
""client"": ""Sumo Logic"",
""client_url"": ""{{QueryUrl}}""
}
JSON,
resolutionPayloadOverride = <<JSON
{
""service_key"": ""your_pagerduty_api_integration_key"",
""event_type"": ""trigger"",
""description"": ""Alert: Resolved {{TriggerType}} for Monitor {{Name}}"",
""client"": ""Sumo Logic"",
""client_url"": ""{{QueryUrl}}""
}
",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.MonitorFolder;
import com.pulumi.sumologic.MonitorFolderArgs;
import com.pulumi.sumologic.Connection;
import com.pulumi.sumologic.ConnectionArgs;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfMonitorFolder1 = new MonitorFolder("tfMonitorFolder1", MonitorFolderArgs.builder()
.description("A folder for Monitors")
.build());
var examplePagerdutyConnection = new Connection("examplePagerdutyConnection", ConnectionArgs.builder()
.description("PagerDuty connection for notifications from Monitors")
.type("WebhookConnection")
.webhookType("PagerDuty")
.url("https://events.pagerduty.com/")
.defaultPayload("""
{
"service_key": "pagerduty_api_integration_key",
"event_type": "trigger",
"description": "PagerDuty connection for notifications",
"client": "Sumo Logic",
"client_url": ""
}
""")
.build());
var tfLogsMonitor2 = new Monitor("tfLogsMonitor2", MonitorArgs.builder()
.description("tf logs monitor with webhook")
.type("MonitorsLibraryMonitor")
.parentId(tfMonitorFolder1.monitorFolderId())
.isDisabled(false)
.contentType("Monitor")
.monitorType("Logs")
.tags(Map.ofEntries(
Map.entry("team", "monitoring"),
Map.entry("application", "sumologic")
))
.queries(MonitorQueryArgs.builder()
.rowId("A")
.query("_sourceCategory=event-action info")
.build())
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.logsStaticCondition(MonitorTriggerConditionsLogsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsLogsStaticConditionCriticalArgs.builder()
.timeRange("15m")
.frequency("5m")
.alert(MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs.builder()
.threshold(40)
.thresholdType("GreaterThan")
.build())
.resolution(MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs.builder()
.threshold(40)
.thresholdType("LessThanOrEqual")
.resolutionWindow("5m")
.build())
.build())
.build())
.build())
.notifications(
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.recipients("abc@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build(),
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("PagerDuty")
.connectionId(examplePagerdutyConnection.connectionId())
.payloadOverride("""
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
JSON,
resolutionPayloadOverride = <<JSON
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
""")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.build());
}
}
resources:
tfMonitorFolder1:
type: sumologic:MonitorFolder
properties:
description: A folder for Monitors
examplePagerdutyConnection:
type: sumologic:Connection
properties:
description: PagerDuty connection for notifications from Monitors
type: WebhookConnection
webhookType: PagerDuty
url: https://events.pagerduty.com/
defaultPayload: |
{
"service_key": "pagerduty_api_integration_key",
"event_type": "trigger",
"description": "PagerDuty connection for notifications",
"client": "Sumo Logic",
"client_url": ""
}
tfLogsMonitor2:
type: sumologic:Monitor
properties:
description: tf logs monitor with webhook
type: MonitorsLibraryMonitor
parentId: ${tfMonitorFolder1.monitorFolderId}
isDisabled: false
contentType: Monitor
monitorType: Logs
tags:
team: monitoring
application: sumologic
queries:
- rowId: A
query: _sourceCategory=event-action info
triggerConditions:
logsStaticCondition:
critical:
timeRange: 15m
frequency: 5m
alert:
threshold: 40
thresholdType: GreaterThan
resolution:
threshold: 40
thresholdType: LessThanOrEqual
resolutionWindow: 5m
notifications:
- notification:
connectionType: Email
recipients:
- abc@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
runForTriggerTypes:
- Critical
- ResolvedCritical
- notification:
connectionType: PagerDuty
connectionId: ${examplePagerdutyConnection.connectionId}
payloadOverride: |
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Triggered {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
JSON,
resolutionPayloadOverride = <<JSON
{
"service_key": "your_pagerduty_api_integration_key",
"event_type": "trigger",
"description": "Alert: Resolved {{TriggerType}} for Monitor {{Name}}",
"client": "Sumo Logic",
"client_url": "{{QueryUrl}}"
}
runForTriggerTypes:
- Critical
- ResolvedCritical
Example Logs Anomaly Monitor
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfExampleAnomalyMonitor = new sumologic.Monitor("tfExampleAnomalyMonitor", {
description: "example anomaly monitor",
isDisabled: false,
monitorType: "Logs",
notifications: [{
notification: {
connectionType: "Email",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
recipients: ["anomaly@example.com"],
subject: "Monitor Alert: {{TriggerType}} on {{Name}}",
timeZone: "PST",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
}],
queries: [{
query: "_sourceCategory=api error | timeslice 5m | count by _sourceHost",
rowId: "A",
}],
triggerConditions: {
logsAnomalyCondition: {
anomalyDetectorType: "Cluster",
critical: {
minAnomalyCount: 9,
sensitivity: 0.4,
timeRange: "-3h",
},
field: "_count",
},
},
type: "MonitorsLibraryMonitor",
});
import pulumi
import pulumi_sumologic as sumologic
tf_example_anomaly_monitor = sumologic.Monitor("tfExampleAnomalyMonitor",
description="example anomaly monitor",
is_disabled=False,
monitor_type="Logs",
notifications=[{
"notification": {
"connection_type": "Email",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
"recipients": ["anomaly@example.com"],
"subject": "Monitor Alert: {{TriggerType}} on {{Name}}",
"time_zone": "PST",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
}],
queries=[{
"query": "_sourceCategory=api error | timeslice 5m | count by _sourceHost",
"row_id": "A",
}],
trigger_conditions={
"logs_anomaly_condition": {
"anomaly_detector_type": "Cluster",
"critical": {
"min_anomaly_count": 9,
"sensitivity": 0.4,
"time_range": "-3h",
},
"field": "_count",
},
},
type="MonitorsLibraryMonitor")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sumologic.NewMonitor(ctx, "tfExampleAnomalyMonitor", &sumologic.MonitorArgs{
Description: pulumi.String("example anomaly monitor"),
IsDisabled: pulumi.Bool(false),
MonitorType: pulumi.String("Logs"),
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
Recipients: pulumi.StringArray{
pulumi.String("anomaly@example.com"),
},
Subject: pulumi.String("Monitor Alert: {{TriggerType}} on {{Name}}"),
TimeZone: pulumi.String("PST"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("_sourceCategory=api error | timeslice 5m | count by _sourceHost"),
RowId: pulumi.String("A"),
},
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
LogsAnomalyCondition: &sumologic.MonitorTriggerConditionsLogsAnomalyConditionArgs{
AnomalyDetectorType: pulumi.String("Cluster"),
Critical: &sumologic.MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs{
MinAnomalyCount: pulumi.Float64(9),
Sensitivity: pulumi.Float64(0.4),
TimeRange: pulumi.String("-3h"),
},
Field: pulumi.String("_count"),
},
},
Type: pulumi.String("MonitorsLibraryMonitor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfExampleAnomalyMonitor = new Sumologic.Monitor("tfExampleAnomalyMonitor", new()
{
Description = "example anomaly monitor",
IsDisabled = false,
MonitorType = "Logs",
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
Recipients = new[]
{
"anomaly@example.com",
},
Subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
TimeZone = "PST",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "_sourceCategory=api error | timeslice 5m | count by _sourceHost",
RowId = "A",
},
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
LogsAnomalyCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsAnomalyConditionArgs
{
AnomalyDetectorType = "Cluster",
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs
{
MinAnomalyCount = 9,
Sensitivity = 0.4,
TimeRange = "-3h",
},
Field = "_count",
},
},
Type = "MonitorsLibraryMonitor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsAnomalyConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfExampleAnomalyMonitor = new Monitor("tfExampleAnomalyMonitor", MonitorArgs.builder()
.description("example anomaly monitor")
.isDisabled(false)
.monitorType("Logs")
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("anomaly@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.queries(MonitorQueryArgs.builder()
.query("_sourceCategory=api error | timeslice 5m | count by _sourceHost")
.rowId("A")
.build())
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.logsAnomalyCondition(MonitorTriggerConditionsLogsAnomalyConditionArgs.builder()
.anomalyDetectorType("Cluster")
.critical(MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs.builder()
.minAnomalyCount(9)
.sensitivity(0.4)
.timeRange("-3h")
.build())
.field("_count")
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfExampleAnomalyMonitor:
type: sumologic:Monitor
properties:
description: example anomaly monitor
isDisabled: false
monitorType: Logs
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- anomaly@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
queries:
- query: _sourceCategory=api error | timeslice 5m | count by _sourceHost
rowId: A
triggerConditions:
logsAnomalyCondition:
anomalyDetectorType: Cluster
critical:
minAnomalyCount: 9
sensitivity: 0.4
timeRange: -3h
field: _count
type: MonitorsLibraryMonitor
Example Metrics Anomaly Monitor
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfExampleMetricsAnomalyMonitor = new sumologic.Monitor("tfExampleMetricsAnomalyMonitor", {
description: "example metrics anomaly monitor",
isDisabled: false,
monitorType: "Metrics",
notifications: [{
notification: {
connectionType: "Email",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
recipients: ["anomaly@example.com"],
subject: "Monitor Alert: {{TriggerType}} on {{Name}}",
timeZone: "PST",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
}],
queries: [{
query: "service=auth api=login metric=HTTP_5XX_Count | avg",
rowId: "A",
}],
triggerConditions: {
metricsAnomalyCondition: {
anomalyDetectorType: "Cluster",
critical: {
minAnomalyCount: 9,
sensitivity: 0.4,
timeRange: "-3h",
},
},
},
type: "MonitorsLibraryMonitor",
});
import pulumi
import pulumi_sumologic as sumologic
tf_example_metrics_anomaly_monitor = sumologic.Monitor("tfExampleMetricsAnomalyMonitor",
description="example metrics anomaly monitor",
is_disabled=False,
monitor_type="Metrics",
notifications=[{
"notification": {
"connection_type": "Email",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
"recipients": ["anomaly@example.com"],
"subject": "Monitor Alert: {{TriggerType}} on {{Name}}",
"time_zone": "PST",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
}],
queries=[{
"query": "service=auth api=login metric=HTTP_5XX_Count | avg",
"row_id": "A",
}],
trigger_conditions={
"metrics_anomaly_condition": {
"anomaly_detector_type": "Cluster",
"critical": {
"min_anomaly_count": 9,
"sensitivity": 0.4,
"time_range": "-3h",
},
},
},
type="MonitorsLibraryMonitor")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sumologic.NewMonitor(ctx, "tfExampleMetricsAnomalyMonitor", &sumologic.MonitorArgs{
Description: pulumi.String("example metrics anomaly monitor"),
IsDisabled: pulumi.Bool(false),
MonitorType: pulumi.String("Metrics"),
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
Recipients: pulumi.StringArray{
pulumi.String("anomaly@example.com"),
},
Subject: pulumi.String("Monitor Alert: {{TriggerType}} on {{Name}}"),
TimeZone: pulumi.String("PST"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("service=auth api=login metric=HTTP_5XX_Count | avg"),
RowId: pulumi.String("A"),
},
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
MetricsAnomalyCondition: &sumologic.MonitorTriggerConditionsMetricsAnomalyConditionArgs{
AnomalyDetectorType: pulumi.String("Cluster"),
Critical: &sumologic.MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs{
MinAnomalyCount: pulumi.Float64(9),
Sensitivity: pulumi.Float64(0.4),
TimeRange: pulumi.String("-3h"),
},
},
},
Type: pulumi.String("MonitorsLibraryMonitor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfExampleMetricsAnomalyMonitor = new Sumologic.Monitor("tfExampleMetricsAnomalyMonitor", new()
{
Description = "example metrics anomaly monitor",
IsDisabled = false,
MonitorType = "Metrics",
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
Recipients = new[]
{
"anomaly@example.com",
},
Subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
TimeZone = "PST",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "service=auth api=login metric=HTTP_5XX_Count | avg",
RowId = "A",
},
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
MetricsAnomalyCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsAnomalyConditionArgs
{
AnomalyDetectorType = "Cluster",
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs
{
MinAnomalyCount = 9,
Sensitivity = 0.4,
TimeRange = "-3h",
},
},
},
Type = "MonitorsLibraryMonitor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsAnomalyConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfExampleMetricsAnomalyMonitor = new Monitor("tfExampleMetricsAnomalyMonitor", MonitorArgs.builder()
.description("example metrics anomaly monitor")
.isDisabled(false)
.monitorType("Metrics")
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("anomaly@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.queries(MonitorQueryArgs.builder()
.query("service=auth api=login metric=HTTP_5XX_Count | avg")
.rowId("A")
.build())
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.metricsAnomalyCondition(MonitorTriggerConditionsMetricsAnomalyConditionArgs.builder()
.anomalyDetectorType("Cluster")
.critical(MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs.builder()
.minAnomalyCount(9)
.sensitivity(0.4)
.timeRange("-3h")
.build())
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfExampleMetricsAnomalyMonitor:
type: sumologic:Monitor
properties:
description: example metrics anomaly monitor
isDisabled: false
monitorType: Metrics
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- anomaly@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
queries:
- query: service=auth api=login metric=HTTP_5XX_Count | avg
rowId: A
triggerConditions:
metricsAnomalyCondition:
anomalyDetectorType: Cluster
critical:
minAnomalyCount: 9
sensitivity: 0.4
timeRange: -3h
type: MonitorsLibraryMonitor
Example Monitor with linked Playbook
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfMonitorWithPlaybook = new sumologic.Monitor("tfMonitorWithPlaybook", {
automatedPlaybookIds: ["683a60a123ad6099e4d1333e"],
contentType: "Monitor",
description: "tf monitor with Playbook",
evaluationDelay: "1m",
isDisabled: false,
monitorType: "Metrics",
notificationGroupFields: ["metric"],
notifications: [{
notification: {
connectionType: "Email",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
recipients: ["abc@example.com"],
subject: "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
timeZone: "PST",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
}],
playbook: "test playbook",
queries: [{
query: "metric=CPU* _sourceCategory=event-action",
rowId: "A",
}],
tags: {
application: "sumologic",
team: "monitoring",
},
triggerConditions: {
metricsStaticCondition: {
critical: {
alert: {
minDataPoints: 5,
threshold: 40,
thresholdType: "GreaterThan",
},
occurrenceType: "Always",
resolution: {
threshold: 40,
thresholdType: "LessThanOrEqual",
},
timeRange: "15m",
},
},
},
type: "MonitorsLibraryMonitor",
});
import pulumi
import pulumi_sumologic as sumologic
tf_monitor_with_playbook = sumologic.Monitor("tfMonitorWithPlaybook",
automated_playbook_ids=["683a60a123ad6099e4d1333e"],
content_type="Monitor",
description="tf monitor with Playbook",
evaluation_delay="1m",
is_disabled=False,
monitor_type="Metrics",
notification_group_fields=["metric"],
notifications=[{
"notification": {
"connection_type": "Email",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
"recipients": ["abc@example.com"],
"subject": "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
"time_zone": "PST",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
}],
playbook="test playbook",
queries=[{
"query": "metric=CPU* _sourceCategory=event-action",
"row_id": "A",
}],
tags={
"application": "sumologic",
"team": "monitoring",
},
trigger_conditions={
"metrics_static_condition": {
"critical": {
"alert": {
"min_data_points": 5,
"threshold": 40,
"threshold_type": "GreaterThan",
},
"occurrence_type": "Always",
"resolution": {
"threshold": 40,
"threshold_type": "LessThanOrEqual",
},
"time_range": "15m",
},
},
},
type="MonitorsLibraryMonitor")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sumologic.NewMonitor(ctx, "tfMonitorWithPlaybook", &sumologic.MonitorArgs{
AutomatedPlaybookIds: pulumi.StringArray{
pulumi.String("683a60a123ad6099e4d1333e"),
},
ContentType: pulumi.String("Monitor"),
Description: pulumi.String("tf monitor with Playbook"),
EvaluationDelay: pulumi.String("1m"),
IsDisabled: pulumi.Bool(false),
MonitorType: pulumi.String("Metrics"),
NotificationGroupFields: pulumi.StringArray{
pulumi.String("metric"),
},
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
Recipients: pulumi.StringArray{
pulumi.String("abc@example.com"),
},
Subject: pulumi.String("Triggered {{TriggerType}} Alert on Monitor {{Name}}"),
TimeZone: pulumi.String("PST"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Playbook: pulumi.String("test playbook"),
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("metric=CPU* _sourceCategory=event-action"),
RowId: pulumi.String("A"),
},
},
Tags: pulumi.StringMap{
"application": pulumi.String("sumologic"),
"team": pulumi.String("monitoring"),
},
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
MetricsStaticCondition: &sumologic.MonitorTriggerConditionsMetricsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs{
Alert: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs{
MinDataPoints: pulumi.Float64(5),
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("GreaterThan"),
},
OccurrenceType: pulumi.String("Always"),
Resolution: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs{
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("LessThanOrEqual"),
},
TimeRange: pulumi.String("15m"),
},
},
},
Type: pulumi.String("MonitorsLibraryMonitor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfMonitorWithPlaybook = new Sumologic.Monitor("tfMonitorWithPlaybook", new()
{
AutomatedPlaybookIds = new[]
{
"683a60a123ad6099e4d1333e",
},
ContentType = "Monitor",
Description = "tf monitor with Playbook",
EvaluationDelay = "1m",
IsDisabled = false,
MonitorType = "Metrics",
NotificationGroupFields = new[]
{
"metric",
},
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
Recipients = new[]
{
"abc@example.com",
},
Subject = "Triggered {{TriggerType}} Alert on Monitor {{Name}}",
TimeZone = "PST",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Playbook = "test playbook",
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "metric=CPU* _sourceCategory=event-action",
RowId = "A",
},
},
Tags =
{
{ "application", "sumologic" },
{ "team", "monitoring" },
},
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
MetricsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs
{
MinDataPoints = 5,
Threshold = 40,
ThresholdType = "GreaterThan",
},
OccurrenceType = "Always",
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs
{
Threshold = 40,
ThresholdType = "LessThanOrEqual",
},
TimeRange = "15m",
},
},
},
Type = "MonitorsLibraryMonitor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfMonitorWithPlaybook = new Monitor("tfMonitorWithPlaybook", MonitorArgs.builder()
.automatedPlaybookIds("683a60a123ad6099e4d1333e")
.contentType("Monitor")
.description("tf monitor with Playbook")
.evaluationDelay("1m")
.isDisabled(false)
.monitorType("Metrics")
.notificationGroupFields("metric")
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("abc@example.com")
.subject("Triggered {{TriggerType}} Alert on Monitor {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.playbook("test playbook")
.queries(MonitorQueryArgs.builder()
.query("metric=CPU* _sourceCategory=event-action")
.rowId("A")
.build())
.tags(Map.ofEntries(
Map.entry("application", "sumologic"),
Map.entry("team", "monitoring")
))
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.metricsStaticCondition(MonitorTriggerConditionsMetricsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsMetricsStaticConditionCriticalArgs.builder()
.alert(MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs.builder()
.minDataPoints(5)
.threshold(40)
.thresholdType("GreaterThan")
.build())
.occurrenceType("Always")
.resolution(MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs.builder()
.threshold(40)
.thresholdType("LessThanOrEqual")
.build())
.timeRange("15m")
.build())
.build())
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfMonitorWithPlaybook:
type: sumologic:Monitor
properties:
automatedPlaybookIds:
- 683a60a123ad6099e4d1333e
contentType: Monitor
description: tf monitor with Playbook
evaluationDelay: 1m
isDisabled: false
monitorType: Metrics
notificationGroupFields:
- metric
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- abc@example.com
subject: Triggered {{TriggerType}} Alert on Monitor {{Name}}
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
playbook: test playbook
queries:
- query: metric=CPU* _sourceCategory=event-action
rowId: A
tags:
application: sumologic
team: monitoring
triggerConditions:
metricsStaticCondition:
critical:
alert:
minDataPoints: 5
threshold: 40
thresholdType: GreaterThan
occurrenceType: Always
resolution:
threshold: 40
thresholdType: LessThanOrEqual
timeRange: 15m
type: MonitorsLibraryMonitor
Monitor Folders
NOTE: Monitor folders are considered a different resource from Library content folders. See sumologic.MonitorFolder for more details.
The trigger_conditions
block
A trigger_conditions
block configures conditions for sending notifications.
Example
import * as pulumi from "@pulumi/pulumi";
import pulumi
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
return await Deployment.RunAsync(() =>
{
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
}
}
{}
Arguments
A trigger_conditions
block contains one or more subblocks of the following types:
logs_static_condition
metrics_static_condition
logs_outlier_condition
metrics_outlier_condition
logs_missing_data_condition
metrics_missing_data_condition
slo_sli_condition
slo_burn_rate_condition
logs_anomaly_condition
metrics_anomaly_condition
Subblocks should be limited to at most 1 missing data condition and at most 1 static / outlier condition.
Here is a summary of arguments for each condition type (fields which are not marked as Required
are optional):
logs_static_condition
field
critical
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.frequency
Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:1m
,2m
,10m
'.alert
(Required)threshold
threshold_type
resolution
(Required)threshold
threshold_type
resolution_window
Accepted format:<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:0s, 30m
.
warning
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.alert
(Required)threshold
threshold_type
resolution
(Required)threshold
threshold_type
resolution_window
Accepted format:<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:0s, 30m
.
metrics_static_condition
critical
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.occurrence_type
(Required)alert
(Required)threshold
threshold_type
min_data_points
(Optional)
resolution
(Required)threshold
threshold_type
min_data_points
(Optional)
warning
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.occurrence_type
(Required)alert
(Required)threshold
threshold_type
min_data_points
(Optional)
resolution
(Required)threshold
threshold_type
min_data_points
(Optional)
logs_outlier_condition
field
direction
critical
window
consecutive
threshold
warning
window
consecutive
threshold
metrics_outlier_condition
direction
critical
baseline_window
threshold
warning
baseline_window
threshold
logs_missing_data_condition
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.frequency
Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:1m
,2m
,10m
'.
metrics_missing_data_condition
time_range
(Required) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.
slo_sli_condition
critical
sli_threshold
(Required) : The remaining SLI error budget threshold percentage [0,100).
warning
sli_threshold
(Required)
slo_burn_rate_condition
critical
time_range
(Deprecated) : The relative time range for the burn rate percentage evaluation. Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.burn_rate_threshold
(Deprecated) : The burn rate percentage threshold.burn_rate
(Required if above two fields are not present): Block to specify burn rate threshold and time range for the condition.burn_rate_threshold
(Required): The burn rate percentage threshold.time_range
(Required): The relative time range for the burn rate percentage evaluation. Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.
warning
time_range
(Deprecated) : Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.burn_rate_threshold
(Deprecated)burn_rate
(Required if above two fields are not present): Block to specify burn rate threshold and time range for the condition.burn_rate_threshold
(Required): The burn rate percentage threshold.time_range
(Required): The relative time range for the burn rate percentage evaluation. Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.
logs_anomaly_condition
field
: The name of the field that the trigger condition will alert on. The trigger could compare the value of specified field with the threshold. If field is not specified, monitor would default to result count instead.anomaly_detector_type
: The type of anomaly model that will be used for evaluating this monitor. Possible values are:Cluster
.critical
sensitivity
: The triggering sensitivity of the anomaly model used for this monitor.min_anomaly_count
(Required) : The minimum number of anomalies required to exist in the current time range for the condition to trigger.time_range
(Required) : The relative time range for anomaly evaluation. Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.
metrics_anomaly_condition
anomaly_detector_type
: The type of anomaly model that will be used for evaluating this monitor. Possible values are:Cluster
.critical
sensitivity
: The triggering sensitivity of the anomaly model used for this monitor.min_anomaly_count
(Required) : The minimum number of anomalies required to exist in the current time range for the condition to trigger.time_range
(Required) : The relative time range for anomaly evaluation. Accepted format: Optional-
sign followed by<number>
followed by a<time_unit>
character:s
for seconds,m
for minutes,h
for hours,d
for days. Examples:30m
,-12h
.
The triggers
block
The triggers
block is deprecated. Please use trigger_conditions
to specify notification conditions.
Here’s an example logs monitor that uses triggers
to specify trigger conditions:
import * as pulumi from "@pulumi/pulumi";
import * as sumologic from "@pulumi/sumologic";
const tfLogsMonitor1 = new sumologic.Monitor("tfLogsMonitor1", {
contentType: "Monitor",
description: "tf logs monitor",
isDisabled: false,
monitorType: "Logs",
notifications: [
{
notification: {
connectionType: "Email",
messageBody: "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
recipients: ["abc@example.com"],
subject: "Monitor Alert: {{TriggerType}} on {{Name}}",
timeZone: "PST",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
{
notification: {
connectionId: "0000000000ABC123",
connectionType: "Webhook",
},
runForTriggerTypes: [
"Critical",
"ResolvedCritical",
],
},
],
queries: [{
query: "_sourceCategory=event-action info",
rowId: "A",
}],
triggers: [
{
detectionMethod: "StaticCondition",
occurrenceType: "ResultCount",
threshold: 40,
thresholdType: "GreaterThan",
timeRange: "15m",
triggerSource: "AllResults",
triggerType: "Critical",
},
{
detectionMethod: "StaticCondition",
occurrenceType: "ResultCount",
resolutionWindow: "5m",
threshold: 40,
thresholdType: "LessThanOrEqual",
timeRange: "15m",
triggerSource: "AllResults",
triggerType: "ResolvedCritical",
},
],
type: "MonitorsLibraryMonitor",
});
import pulumi
import pulumi_sumologic as sumologic
tf_logs_monitor1 = sumologic.Monitor("tfLogsMonitor1",
content_type="Monitor",
description="tf logs monitor",
is_disabled=False,
monitor_type="Logs",
notifications=[
{
"notification": {
"connection_type": "Email",
"message_body": "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
"recipients": ["abc@example.com"],
"subject": "Monitor Alert: {{TriggerType}} on {{Name}}",
"time_zone": "PST",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
{
"notification": {
"connection_id": "0000000000ABC123",
"connection_type": "Webhook",
},
"run_for_trigger_types": [
"Critical",
"ResolvedCritical",
],
},
],
queries=[{
"query": "_sourceCategory=event-action info",
"row_id": "A",
}],
triggers=[
{
"detection_method": "StaticCondition",
"occurrence_type": "ResultCount",
"threshold": 40,
"threshold_type": "GreaterThan",
"time_range": "15m",
"trigger_source": "AllResults",
"trigger_type": "Critical",
},
{
"detection_method": "StaticCondition",
"occurrence_type": "ResultCount",
"resolution_window": "5m",
"threshold": 40,
"threshold_type": "LessThanOrEqual",
"time_range": "15m",
"trigger_source": "AllResults",
"trigger_type": "ResolvedCritical",
},
],
type="MonitorsLibraryMonitor")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/sumologic/v3/sumologic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := sumologic.NewMonitor(ctx, "tfLogsMonitor1", &sumologic.MonitorArgs{
ContentType: pulumi.String("Monitor"),
Description: pulumi.String("tf logs monitor"),
IsDisabled: pulumi.Bool(false),
MonitorType: pulumi.String("Logs"),
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionType: pulumi.String("Email"),
MessageBody: pulumi.String("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}"),
Recipients: pulumi.StringArray{
pulumi.String("abc@example.com"),
},
Subject: pulumi.String("Monitor Alert: {{TriggerType}} on {{Name}}"),
TimeZone: pulumi.String("PST"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionId: pulumi.String("0000000000ABC123"),
ConnectionType: pulumi.String("Webhook"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("Critical"),
pulumi.String("ResolvedCritical"),
},
},
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("_sourceCategory=event-action info"),
RowId: pulumi.String("A"),
},
},
Triggers: sumologic.MonitorTriggerArray{
&sumologic.MonitorTriggerArgs{
DetectionMethod: pulumi.String("StaticCondition"),
OccurrenceType: pulumi.String("ResultCount"),
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("GreaterThan"),
TimeRange: pulumi.String("15m"),
TriggerSource: pulumi.String("AllResults"),
TriggerType: pulumi.String("Critical"),
},
&sumologic.MonitorTriggerArgs{
DetectionMethod: pulumi.String("StaticCondition"),
OccurrenceType: pulumi.String("ResultCount"),
ResolutionWindow: pulumi.String("5m"),
Threshold: pulumi.Float64(40),
ThresholdType: pulumi.String("LessThanOrEqual"),
TimeRange: pulumi.String("15m"),
TriggerSource: pulumi.String("AllResults"),
TriggerType: pulumi.String("ResolvedCritical"),
},
},
Type: pulumi.String("MonitorsLibraryMonitor"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Sumologic = Pulumi.Sumologic;
return await Deployment.RunAsync(() =>
{
var tfLogsMonitor1 = new Sumologic.Monitor("tfLogsMonitor1", new()
{
ContentType = "Monitor",
Description = "tf logs monitor",
IsDisabled = false,
MonitorType = "Logs",
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionType = "Email",
MessageBody = "Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}",
Recipients = new[]
{
"abc@example.com",
},
Subject = "Monitor Alert: {{TriggerType}} on {{Name}}",
TimeZone = "PST",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionId = "0000000000ABC123",
ConnectionType = "Webhook",
},
RunForTriggerTypes = new[]
{
"Critical",
"ResolvedCritical",
},
},
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "_sourceCategory=event-action info",
RowId = "A",
},
},
Triggers = new[]
{
new Sumologic.Inputs.MonitorTriggerArgs
{
DetectionMethod = "StaticCondition",
OccurrenceType = "ResultCount",
Threshold = 40,
ThresholdType = "GreaterThan",
TimeRange = "15m",
TriggerSource = "AllResults",
TriggerType = "Critical",
},
new Sumologic.Inputs.MonitorTriggerArgs
{
DetectionMethod = "StaticCondition",
OccurrenceType = "ResultCount",
ResolutionWindow = "5m",
Threshold = 40,
ThresholdType = "LessThanOrEqual",
TimeRange = "15m",
TriggerSource = "AllResults",
TriggerType = "ResolvedCritical",
},
},
Type = "MonitorsLibraryMonitor",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.sumologic.Monitor;
import com.pulumi.sumologic.MonitorArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorNotificationNotificationArgs;
import com.pulumi.sumologic.inputs.MonitorQueryArgs;
import com.pulumi.sumologic.inputs.MonitorTriggerArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var tfLogsMonitor1 = new Monitor("tfLogsMonitor1", MonitorArgs.builder()
.contentType("Monitor")
.description("tf logs monitor")
.isDisabled(false)
.monitorType("Logs")
.notifications(
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionType("Email")
.messageBody("Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}")
.recipients("abc@example.com")
.subject("Monitor Alert: {{TriggerType}} on {{Name}}")
.timeZone("PST")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build(),
MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionId("0000000000ABC123")
.connectionType("Webhook")
.build())
.runForTriggerTypes(
"Critical",
"ResolvedCritical")
.build())
.queries(MonitorQueryArgs.builder()
.query("_sourceCategory=event-action info")
.rowId("A")
.build())
.triggers(
MonitorTriggerArgs.builder()
.detectionMethod("StaticCondition")
.occurrenceType("ResultCount")
.threshold(40)
.thresholdType("GreaterThan")
.timeRange("15m")
.triggerSource("AllResults")
.triggerType("Critical")
.build(),
MonitorTriggerArgs.builder()
.detectionMethod("StaticCondition")
.occurrenceType("ResultCount")
.resolutionWindow("5m")
.threshold(40)
.thresholdType("LessThanOrEqual")
.timeRange("15m")
.triggerSource("AllResults")
.triggerType("ResolvedCritical")
.build())
.type("MonitorsLibraryMonitor")
.build());
}
}
resources:
tfLogsMonitor1:
type: sumologic:Monitor
properties:
contentType: Monitor
description: tf logs monitor
isDisabled: false
monitorType: Logs
notifications:
- notification:
connectionType: Email
messageBody: 'Triggered {{TriggerType}} Alert on {{Name}}: {{QueryURL}}'
recipients:
- abc@example.com
subject: 'Monitor Alert: {{TriggerType}} on {{Name}}'
timeZone: PST
runForTriggerTypes:
- Critical
- ResolvedCritical
- notification:
connectionId: 0000000000ABC123
connectionType: Webhook
runForTriggerTypes:
- Critical
- ResolvedCritical
queries:
- query: _sourceCategory=event-action info
rowId: A
triggers:
- detectionMethod: StaticCondition
occurrenceType: ResultCount
threshold: 40
thresholdType: GreaterThan
timeRange: 15m
triggerSource: AllResults
triggerType: Critical
- detectionMethod: StaticCondition
occurrenceType: ResultCount
resolutionWindow: 5m
threshold: 40
thresholdType: LessThanOrEqual
timeRange: 15m
triggerSource: AllResults
triggerType: ResolvedCritical
type: MonitorsLibraryMonitor
Create Monitor Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
@overload
def Monitor(resource_name: str,
args: MonitorArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Monitor(resource_name: str,
opts: Optional[ResourceOptions] = None,
monitor_type: Optional[str] = None,
monitor_id: Optional[str] = None,
playbook: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
description: Optional[str] = None,
evaluation_delay: Optional[str] = None,
group_notifications: Optional[bool] = None,
is_disabled: Optional[bool] = None,
is_locked: Optional[bool] = None,
is_mutable: Optional[bool] = None,
is_system: Optional[bool] = None,
modified_at: Optional[str] = None,
modified_by: Optional[str] = None,
alert_name: Optional[str] = None,
content_type: Optional[str] = None,
automated_playbook_ids: Optional[Sequence[str]] = None,
queries: Optional[Sequence[MonitorQueryArgs]] = None,
notifications: Optional[Sequence[MonitorNotificationArgs]] = None,
obj_permissions: Optional[Sequence[MonitorObjPermissionArgs]] = None,
parent_id: Optional[str] = None,
name: Optional[str] = None,
post_request_map: Optional[Mapping[str, str]] = None,
notification_group_fields: Optional[Sequence[str]] = None,
slo_id: Optional[str] = None,
tags: Optional[Mapping[str, str]] = None,
time_zone: Optional[str] = None,
trigger_conditions: Optional[MonitorTriggerConditionsArgs] = None,
triggers: Optional[Sequence[MonitorTriggerArgs]] = None,
type: Optional[str] = None,
version: Optional[float] = None)
func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
public Monitor(String name, MonitorArgs args)
public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
type: sumologic:Monitor
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var monitorResource = new Sumologic.Monitor("monitorResource", new()
{
MonitorType = "string",
MonitorId = "string",
Playbook = "string",
CreatedAt = "string",
CreatedBy = "string",
Description = "string",
EvaluationDelay = "string",
GroupNotifications = false,
IsDisabled = false,
IsLocked = false,
IsMutable = false,
IsSystem = false,
ModifiedAt = "string",
ModifiedBy = "string",
AlertName = "string",
ContentType = "string",
AutomatedPlaybookIds = new[]
{
"string",
},
Queries = new[]
{
new Sumologic.Inputs.MonitorQueryArgs
{
Query = "string",
RowId = "string",
},
},
Notifications = new[]
{
new Sumologic.Inputs.MonitorNotificationArgs
{
Notification = new Sumologic.Inputs.MonitorNotificationNotificationArgs
{
ConnectionId = "string",
ConnectionType = "string",
MessageBody = "string",
PayloadOverride = "string",
Recipients = new[]
{
"string",
},
ResolutionPayloadOverride = "string",
Subject = "string",
TimeZone = "string",
},
RunForTriggerTypes = new[]
{
"string",
},
},
},
ObjPermissions = new[]
{
new Sumologic.Inputs.MonitorObjPermissionArgs
{
Permissions = new[]
{
"string",
},
SubjectId = "string",
SubjectType = "string",
},
},
ParentId = "string",
Name = "string",
PostRequestMap =
{
{ "string", "string" },
},
NotificationGroupFields = new[]
{
"string",
},
SloId = "string",
Tags =
{
{ "string", "string" },
},
TimeZone = "string",
TriggerConditions = new Sumologic.Inputs.MonitorTriggerConditionsArgs
{
LogsAnomalyCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsAnomalyConditionArgs
{
AnomalyDetectorType = "string",
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs
{
TimeRange = "string",
MinAnomalyCount = 0,
Sensitivity = 0,
},
Field = "string",
Direction = "string",
},
LogsMissingDataCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsMissingDataConditionArgs
{
TimeRange = "string",
Frequency = "string",
},
LogsOutlierCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsOutlierConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsOutlierConditionCriticalArgs
{
Consecutive = 0,
Threshold = 0,
Window = 0,
},
Direction = "string",
Field = "string",
Warning = new Sumologic.Inputs.MonitorTriggerConditionsLogsOutlierConditionWarningArgs
{
Consecutive = 0,
Threshold = 0,
Window = 0,
},
},
LogsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs
{
Threshold = 0,
ThresholdType = "string",
},
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs
{
ResolutionWindow = "string",
Threshold = 0,
ThresholdType = "string",
},
TimeRange = "string",
Frequency = "string",
},
Field = "string",
Warning = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionWarningArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionWarningAlertArgs
{
Threshold = 0,
ThresholdType = "string",
},
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsLogsStaticConditionWarningResolutionArgs
{
ResolutionWindow = "string",
Threshold = 0,
ThresholdType = "string",
},
TimeRange = "string",
Frequency = "string",
},
},
MetricsAnomalyCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsAnomalyConditionArgs
{
AnomalyDetectorType = "string",
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs
{
TimeRange = "string",
MinAnomalyCount = 0,
Sensitivity = 0,
},
Direction = "string",
},
MetricsMissingDataCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsMissingDataConditionArgs
{
TimeRange = "string",
TriggerSource = "string",
},
MetricsOutlierCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsOutlierConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsOutlierConditionCriticalArgs
{
BaselineWindow = "string",
Threshold = 0,
},
Direction = "string",
Warning = new Sumologic.Inputs.MonitorTriggerConditionsMetricsOutlierConditionWarningArgs
{
BaselineWindow = "string",
Threshold = 0,
},
},
MetricsStaticCondition = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs
{
MinDataPoints = 0,
Threshold = 0,
ThresholdType = "string",
},
OccurrenceType = "string",
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs
{
MinDataPoints = 0,
OccurrenceType = "string",
Threshold = 0,
ThresholdType = "string",
},
TimeRange = "string",
},
Warning = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionWarningArgs
{
Alert = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionWarningAlertArgs
{
MinDataPoints = 0,
Threshold = 0,
ThresholdType = "string",
},
OccurrenceType = "string",
Resolution = new Sumologic.Inputs.MonitorTriggerConditionsMetricsStaticConditionWarningResolutionArgs
{
MinDataPoints = 0,
OccurrenceType = "string",
Threshold = 0,
ThresholdType = "string",
},
TimeRange = "string",
},
},
SloBurnRateCondition = new Sumologic.Inputs.MonitorTriggerConditionsSloBurnRateConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsSloBurnRateConditionCriticalArgs
{
BurnRateThreshold = 0,
BurnRates = new[]
{
new Sumologic.Inputs.MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRateArgs
{
BurnRateThreshold = 0,
TimeRange = "string",
},
},
TimeRange = "string",
},
Warning = new Sumologic.Inputs.MonitorTriggerConditionsSloBurnRateConditionWarningArgs
{
BurnRateThreshold = 0,
BurnRates = new[]
{
new Sumologic.Inputs.MonitorTriggerConditionsSloBurnRateConditionWarningBurnRateArgs
{
BurnRateThreshold = 0,
TimeRange = "string",
},
},
TimeRange = "string",
},
},
SloSliCondition = new Sumologic.Inputs.MonitorTriggerConditionsSloSliConditionArgs
{
Critical = new Sumologic.Inputs.MonitorTriggerConditionsSloSliConditionCriticalArgs
{
SliThreshold = 0,
},
Warning = new Sumologic.Inputs.MonitorTriggerConditionsSloSliConditionWarningArgs
{
SliThreshold = 0,
},
},
},
Type = "string",
Version = 0,
});
example, err := sumologic.NewMonitor(ctx, "monitorResource", &sumologic.MonitorArgs{
MonitorType: pulumi.String("string"),
MonitorId: pulumi.String("string"),
Playbook: pulumi.String("string"),
CreatedAt: pulumi.String("string"),
CreatedBy: pulumi.String("string"),
Description: pulumi.String("string"),
EvaluationDelay: pulumi.String("string"),
GroupNotifications: pulumi.Bool(false),
IsDisabled: pulumi.Bool(false),
IsLocked: pulumi.Bool(false),
IsMutable: pulumi.Bool(false),
IsSystem: pulumi.Bool(false),
ModifiedAt: pulumi.String("string"),
ModifiedBy: pulumi.String("string"),
AlertName: pulumi.String("string"),
ContentType: pulumi.String("string"),
AutomatedPlaybookIds: pulumi.StringArray{
pulumi.String("string"),
},
Queries: sumologic.MonitorQueryArray{
&sumologic.MonitorQueryArgs{
Query: pulumi.String("string"),
RowId: pulumi.String("string"),
},
},
Notifications: sumologic.MonitorNotificationArray{
&sumologic.MonitorNotificationArgs{
Notification: &sumologic.MonitorNotificationNotificationArgs{
ConnectionId: pulumi.String("string"),
ConnectionType: pulumi.String("string"),
MessageBody: pulumi.String("string"),
PayloadOverride: pulumi.String("string"),
Recipients: pulumi.StringArray{
pulumi.String("string"),
},
ResolutionPayloadOverride: pulumi.String("string"),
Subject: pulumi.String("string"),
TimeZone: pulumi.String("string"),
},
RunForTriggerTypes: pulumi.StringArray{
pulumi.String("string"),
},
},
},
ObjPermissions: sumologic.MonitorObjPermissionArray{
&sumologic.MonitorObjPermissionArgs{
Permissions: pulumi.StringArray{
pulumi.String("string"),
},
SubjectId: pulumi.String("string"),
SubjectType: pulumi.String("string"),
},
},
ParentId: pulumi.String("string"),
Name: pulumi.String("string"),
PostRequestMap: pulumi.StringMap{
"string": pulumi.String("string"),
},
NotificationGroupFields: pulumi.StringArray{
pulumi.String("string"),
},
SloId: pulumi.String("string"),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TimeZone: pulumi.String("string"),
TriggerConditions: &sumologic.MonitorTriggerConditionsArgs{
LogsAnomalyCondition: &sumologic.MonitorTriggerConditionsLogsAnomalyConditionArgs{
AnomalyDetectorType: pulumi.String("string"),
Critical: &sumologic.MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs{
TimeRange: pulumi.String("string"),
MinAnomalyCount: pulumi.Float64(0),
Sensitivity: pulumi.Float64(0),
},
Field: pulumi.String("string"),
Direction: pulumi.String("string"),
},
LogsMissingDataCondition: &sumologic.MonitorTriggerConditionsLogsMissingDataConditionArgs{
TimeRange: pulumi.String("string"),
Frequency: pulumi.String("string"),
},
LogsOutlierCondition: &sumologic.MonitorTriggerConditionsLogsOutlierConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsLogsOutlierConditionCriticalArgs{
Consecutive: pulumi.Float64(0),
Threshold: pulumi.Float64(0),
Window: pulumi.Float64(0),
},
Direction: pulumi.String("string"),
Field: pulumi.String("string"),
Warning: &sumologic.MonitorTriggerConditionsLogsOutlierConditionWarningArgs{
Consecutive: pulumi.Float64(0),
Threshold: pulumi.Float64(0),
Window: pulumi.Float64(0),
},
},
LogsStaticCondition: &sumologic.MonitorTriggerConditionsLogsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalArgs{
Alert: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs{
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
Resolution: &sumologic.MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs{
ResolutionWindow: pulumi.String("string"),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
TimeRange: pulumi.String("string"),
Frequency: pulumi.String("string"),
},
Field: pulumi.String("string"),
Warning: &sumologic.MonitorTriggerConditionsLogsStaticConditionWarningArgs{
Alert: &sumologic.MonitorTriggerConditionsLogsStaticConditionWarningAlertArgs{
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
Resolution: &sumologic.MonitorTriggerConditionsLogsStaticConditionWarningResolutionArgs{
ResolutionWindow: pulumi.String("string"),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
TimeRange: pulumi.String("string"),
Frequency: pulumi.String("string"),
},
},
MetricsAnomalyCondition: &sumologic.MonitorTriggerConditionsMetricsAnomalyConditionArgs{
AnomalyDetectorType: pulumi.String("string"),
Critical: &sumologic.MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs{
TimeRange: pulumi.String("string"),
MinAnomalyCount: pulumi.Float64(0),
Sensitivity: pulumi.Float64(0),
},
Direction: pulumi.String("string"),
},
MetricsMissingDataCondition: &sumologic.MonitorTriggerConditionsMetricsMissingDataConditionArgs{
TimeRange: pulumi.String("string"),
TriggerSource: pulumi.String("string"),
},
MetricsOutlierCondition: &sumologic.MonitorTriggerConditionsMetricsOutlierConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsMetricsOutlierConditionCriticalArgs{
BaselineWindow: pulumi.String("string"),
Threshold: pulumi.Float64(0),
},
Direction: pulumi.String("string"),
Warning: &sumologic.MonitorTriggerConditionsMetricsOutlierConditionWarningArgs{
BaselineWindow: pulumi.String("string"),
Threshold: pulumi.Float64(0),
},
},
MetricsStaticCondition: &sumologic.MonitorTriggerConditionsMetricsStaticConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalArgs{
Alert: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs{
MinDataPoints: pulumi.Float64(0),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
OccurrenceType: pulumi.String("string"),
Resolution: &sumologic.MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs{
MinDataPoints: pulumi.Float64(0),
OccurrenceType: pulumi.String("string"),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
TimeRange: pulumi.String("string"),
},
Warning: &sumologic.MonitorTriggerConditionsMetricsStaticConditionWarningArgs{
Alert: &sumologic.MonitorTriggerConditionsMetricsStaticConditionWarningAlertArgs{
MinDataPoints: pulumi.Float64(0),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
OccurrenceType: pulumi.String("string"),
Resolution: &sumologic.MonitorTriggerConditionsMetricsStaticConditionWarningResolutionArgs{
MinDataPoints: pulumi.Float64(0),
OccurrenceType: pulumi.String("string"),
Threshold: pulumi.Float64(0),
ThresholdType: pulumi.String("string"),
},
TimeRange: pulumi.String("string"),
},
},
SloBurnRateCondition: &sumologic.MonitorTriggerConditionsSloBurnRateConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsSloBurnRateConditionCriticalArgs{
BurnRateThreshold: pulumi.Float64(0),
BurnRates: sumologic.MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRateArray{
&sumologic.MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRateArgs{
BurnRateThreshold: pulumi.Float64(0),
TimeRange: pulumi.String("string"),
},
},
TimeRange: pulumi.String("string"),
},
Warning: &sumologic.MonitorTriggerConditionsSloBurnRateConditionWarningArgs{
BurnRateThreshold: pulumi.Float64(0),
BurnRates: sumologic.MonitorTriggerConditionsSloBurnRateConditionWarningBurnRateArray{
&sumologic.MonitorTriggerConditionsSloBurnRateConditionWarningBurnRateArgs{
BurnRateThreshold: pulumi.Float64(0),
TimeRange: pulumi.String("string"),
},
},
TimeRange: pulumi.String("string"),
},
},
SloSliCondition: &sumologic.MonitorTriggerConditionsSloSliConditionArgs{
Critical: &sumologic.MonitorTriggerConditionsSloSliConditionCriticalArgs{
SliThreshold: pulumi.Float64(0),
},
Warning: &sumologic.MonitorTriggerConditionsSloSliConditionWarningArgs{
SliThreshold: pulumi.Float64(0),
},
},
},
Type: pulumi.String("string"),
Version: pulumi.Float64(0),
})
var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
.monitorType("string")
.monitorId("string")
.playbook("string")
.createdAt("string")
.createdBy("string")
.description("string")
.evaluationDelay("string")
.groupNotifications(false)
.isDisabled(false)
.isLocked(false)
.isMutable(false)
.isSystem(false)
.modifiedAt("string")
.modifiedBy("string")
.alertName("string")
.contentType("string")
.automatedPlaybookIds("string")
.queries(MonitorQueryArgs.builder()
.query("string")
.rowId("string")
.build())
.notifications(MonitorNotificationArgs.builder()
.notification(MonitorNotificationNotificationArgs.builder()
.connectionId("string")
.connectionType("string")
.messageBody("string")
.payloadOverride("string")
.recipients("string")
.resolutionPayloadOverride("string")
.subject("string")
.timeZone("string")
.build())
.runForTriggerTypes("string")
.build())
.objPermissions(MonitorObjPermissionArgs.builder()
.permissions("string")
.subjectId("string")
.subjectType("string")
.build())
.parentId("string")
.name("string")
.postRequestMap(Map.of("string", "string"))
.notificationGroupFields("string")
.sloId("string")
.tags(Map.of("string", "string"))
.timeZone("string")
.triggerConditions(MonitorTriggerConditionsArgs.builder()
.logsAnomalyCondition(MonitorTriggerConditionsLogsAnomalyConditionArgs.builder()
.anomalyDetectorType("string")
.critical(MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs.builder()
.timeRange("string")
.minAnomalyCount(0.0)
.sensitivity(0.0)
.build())
.field("string")
.direction("string")
.build())
.logsMissingDataCondition(MonitorTriggerConditionsLogsMissingDataConditionArgs.builder()
.timeRange("string")
.frequency("string")
.build())
.logsOutlierCondition(MonitorTriggerConditionsLogsOutlierConditionArgs.builder()
.critical(MonitorTriggerConditionsLogsOutlierConditionCriticalArgs.builder()
.consecutive(0.0)
.threshold(0.0)
.window(0.0)
.build())
.direction("string")
.field("string")
.warning(MonitorTriggerConditionsLogsOutlierConditionWarningArgs.builder()
.consecutive(0.0)
.threshold(0.0)
.window(0.0)
.build())
.build())
.logsStaticCondition(MonitorTriggerConditionsLogsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsLogsStaticConditionCriticalArgs.builder()
.alert(MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs.builder()
.threshold(0.0)
.thresholdType("string")
.build())
.resolution(MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs.builder()
.resolutionWindow("string")
.threshold(0.0)
.thresholdType("string")
.build())
.timeRange("string")
.frequency("string")
.build())
.field("string")
.warning(MonitorTriggerConditionsLogsStaticConditionWarningArgs.builder()
.alert(MonitorTriggerConditionsLogsStaticConditionWarningAlertArgs.builder()
.threshold(0.0)
.thresholdType("string")
.build())
.resolution(MonitorTriggerConditionsLogsStaticConditionWarningResolutionArgs.builder()
.resolutionWindow("string")
.threshold(0.0)
.thresholdType("string")
.build())
.timeRange("string")
.frequency("string")
.build())
.build())
.metricsAnomalyCondition(MonitorTriggerConditionsMetricsAnomalyConditionArgs.builder()
.anomalyDetectorType("string")
.critical(MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs.builder()
.timeRange("string")
.minAnomalyCount(0.0)
.sensitivity(0.0)
.build())
.direction("string")
.build())
.metricsMissingDataCondition(MonitorTriggerConditionsMetricsMissingDataConditionArgs.builder()
.timeRange("string")
.triggerSource("string")
.build())
.metricsOutlierCondition(MonitorTriggerConditionsMetricsOutlierConditionArgs.builder()
.critical(MonitorTriggerConditionsMetricsOutlierConditionCriticalArgs.builder()
.baselineWindow("string")
.threshold(0.0)
.build())
.direction("string")
.warning(MonitorTriggerConditionsMetricsOutlierConditionWarningArgs.builder()
.baselineWindow("string")
.threshold(0.0)
.build())
.build())
.metricsStaticCondition(MonitorTriggerConditionsMetricsStaticConditionArgs.builder()
.critical(MonitorTriggerConditionsMetricsStaticConditionCriticalArgs.builder()
.alert(MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs.builder()
.minDataPoints(0.0)
.threshold(0.0)
.thresholdType("string")
.build())
.occurrenceType("string")
.resolution(MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs.builder()
.minDataPoints(0.0)
.occurrenceType("string")
.threshold(0.0)
.thresholdType("string")
.build())
.timeRange("string")
.build())
.warning(MonitorTriggerConditionsMetricsStaticConditionWarningArgs.builder()
.alert(MonitorTriggerConditionsMetricsStaticConditionWarningAlertArgs.builder()
.minDataPoints(0.0)
.threshold(0.0)
.thresholdType("string")
.build())
.occurrenceType("string")
.resolution(MonitorTriggerConditionsMetricsStaticConditionWarningResolutionArgs.builder()
.minDataPoints(0.0)
.occurrenceType("string")
.threshold(0.0)
.thresholdType("string")
.build())
.timeRange("string")
.build())
.build())
.sloBurnRateCondition(MonitorTriggerConditionsSloBurnRateConditionArgs.builder()
.critical(MonitorTriggerConditionsSloBurnRateConditionCriticalArgs.builder()
.burnRateThreshold(0.0)
.burnRates(MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRateArgs.builder()
.burnRateThreshold(0.0)
.timeRange("string")
.build())
.timeRange("string")
.build())
.warning(MonitorTriggerConditionsSloBurnRateConditionWarningArgs.builder()
.burnRateThreshold(0.0)
.burnRates(MonitorTriggerConditionsSloBurnRateConditionWarningBurnRateArgs.builder()
.burnRateThreshold(0.0)
.timeRange("string")
.build())
.timeRange("string")
.build())
.build())
.sloSliCondition(MonitorTriggerConditionsSloSliConditionArgs.builder()
.critical(MonitorTriggerConditionsSloSliConditionCriticalArgs.builder()
.sliThreshold(0.0)
.build())
.warning(MonitorTriggerConditionsSloSliConditionWarningArgs.builder()
.sliThreshold(0.0)
.build())
.build())
.build())
.type("string")
.version(0.0)
.build());
monitor_resource = sumologic.Monitor("monitorResource",
monitor_type="string",
monitor_id="string",
playbook="string",
created_at="string",
created_by="string",
description="string",
evaluation_delay="string",
group_notifications=False,
is_disabled=False,
is_locked=False,
is_mutable=False,
is_system=False,
modified_at="string",
modified_by="string",
alert_name="string",
content_type="string",
automated_playbook_ids=["string"],
queries=[{
"query": "string",
"row_id": "string",
}],
notifications=[{
"notification": {
"connection_id": "string",
"connection_type": "string",
"message_body": "string",
"payload_override": "string",
"recipients": ["string"],
"resolution_payload_override": "string",
"subject": "string",
"time_zone": "string",
},
"run_for_trigger_types": ["string"],
}],
obj_permissions=[{
"permissions": ["string"],
"subject_id": "string",
"subject_type": "string",
}],
parent_id="string",
name="string",
post_request_map={
"string": "string",
},
notification_group_fields=["string"],
slo_id="string",
tags={
"string": "string",
},
time_zone="string",
trigger_conditions={
"logs_anomaly_condition": {
"anomaly_detector_type": "string",
"critical": {
"time_range": "string",
"min_anomaly_count": 0,
"sensitivity": 0,
},
"field": "string",
"direction": "string",
},
"logs_missing_data_condition": {
"time_range": "string",
"frequency": "string",
},
"logs_outlier_condition": {
"critical": {
"consecutive": 0,
"threshold": 0,
"window": 0,
},
"direction": "string",
"field": "string",
"warning": {
"consecutive": 0,
"threshold": 0,
"window": 0,
},
},
"logs_static_condition": {
"critical": {
"alert": {
"threshold": 0,
"threshold_type": "string",
},
"resolution": {
"resolution_window": "string",
"threshold": 0,
"threshold_type": "string",
},
"time_range": "string",
"frequency": "string",
},
"field": "string",
"warning": {
"alert": {
"threshold": 0,
"threshold_type": "string",
},
"resolution": {
"resolution_window": "string",
"threshold": 0,
"threshold_type": "string",
},
"time_range": "string",
"frequency": "string",
},
},
"metrics_anomaly_condition": {
"anomaly_detector_type": "string",
"critical": {
"time_range": "string",
"min_anomaly_count": 0,
"sensitivity": 0,
},
"direction": "string",
},
"metrics_missing_data_condition": {
"time_range": "string",
"trigger_source": "string",
},
"metrics_outlier_condition": {
"critical": {
"baseline_window": "string",
"threshold": 0,
},
"direction": "string",
"warning": {
"baseline_window": "string",
"threshold": 0,
},
},
"metrics_static_condition": {
"critical": {
"alert": {
"min_data_points": 0,
"threshold": 0,
"threshold_type": "string",
},
"occurrence_type": "string",
"resolution": {
"min_data_points": 0,
"occurrence_type": "string",
"threshold": 0,
"threshold_type": "string",
},
"time_range": "string",
},
"warning": {
"alert": {
"min_data_points": 0,
"threshold": 0,
"threshold_type": "string",
},
"occurrence_type": "string",
"resolution": {
"min_data_points": 0,
"occurrence_type": "string",
"threshold": 0,
"threshold_type": "string",
},
"time_range": "string",
},
},
"slo_burn_rate_condition": {
"critical": {
"burn_rate_threshold": 0,
"burn_rates": [{
"burn_rate_threshold": 0,
"time_range": "string",
}],
"time_range": "string",
},
"warning": {
"burn_rate_threshold": 0,
"burn_rates": [{
"burn_rate_threshold": 0,
"time_range": "string",
}],
"time_range": "string",
},
},
"slo_sli_condition": {
"critical": {
"sli_threshold": 0,
},
"warning": {
"sli_threshold": 0,
},
},
},
type="string",
version=0)
const monitorResource = new sumologic.Monitor("monitorResource", {
monitorType: "string",
monitorId: "string",
playbook: "string",
createdAt: "string",
createdBy: "string",
description: "string",
evaluationDelay: "string",
groupNotifications: false,
isDisabled: false,
isLocked: false,
isMutable: false,
isSystem: false,
modifiedAt: "string",
modifiedBy: "string",
alertName: "string",
contentType: "string",
automatedPlaybookIds: ["string"],
queries: [{
query: "string",
rowId: "string",
}],
notifications: [{
notification: {
connectionId: "string",
connectionType: "string",
messageBody: "string",
payloadOverride: "string",
recipients: ["string"],
resolutionPayloadOverride: "string",
subject: "string",
timeZone: "string",
},
runForTriggerTypes: ["string"],
}],
objPermissions: [{
permissions: ["string"],
subjectId: "string",
subjectType: "string",
}],
parentId: "string",
name: "string",
postRequestMap: {
string: "string",
},
notificationGroupFields: ["string"],
sloId: "string",
tags: {
string: "string",
},
timeZone: "string",
triggerConditions: {
logsAnomalyCondition: {
anomalyDetectorType: "string",
critical: {
timeRange: "string",
minAnomalyCount: 0,
sensitivity: 0,
},
field: "string",
direction: "string",
},
logsMissingDataCondition: {
timeRange: "string",
frequency: "string",
},
logsOutlierCondition: {
critical: {
consecutive: 0,
threshold: 0,
window: 0,
},
direction: "string",
field: "string",
warning: {
consecutive: 0,
threshold: 0,
window: 0,
},
},
logsStaticCondition: {
critical: {
alert: {
threshold: 0,
thresholdType: "string",
},
resolution: {
resolutionWindow: "string",
threshold: 0,
thresholdType: "string",
},
timeRange: "string",
frequency: "string",
},
field: "string",
warning: {
alert: {
threshold: 0,
thresholdType: "string",
},
resolution: {
resolutionWindow: "string",
threshold: 0,
thresholdType: "string",
},
timeRange: "string",
frequency: "string",
},
},
metricsAnomalyCondition: {
anomalyDetectorType: "string",
critical: {
timeRange: "string",
minAnomalyCount: 0,
sensitivity: 0,
},
direction: "string",
},
metricsMissingDataCondition: {
timeRange: "string",
triggerSource: "string",
},
metricsOutlierCondition: {
critical: {
baselineWindow: "string",
threshold: 0,
},
direction: "string",
warning: {
baselineWindow: "string",
threshold: 0,
},
},
metricsStaticCondition: {
critical: {
alert: {
minDataPoints: 0,
threshold: 0,
thresholdType: "string",
},
occurrenceType: "string",
resolution: {
minDataPoints: 0,
occurrenceType: "string",
threshold: 0,
thresholdType: "string",
},
timeRange: "string",
},
warning: {
alert: {
minDataPoints: 0,
threshold: 0,
thresholdType: "string",
},
occurrenceType: "string",
resolution: {
minDataPoints: 0,
occurrenceType: "string",
threshold: 0,
thresholdType: "string",
},
timeRange: "string",
},
},
sloBurnRateCondition: {
critical: {
burnRateThreshold: 0,
burnRates: [{
burnRateThreshold: 0,
timeRange: "string",
}],
timeRange: "string",
},
warning: {
burnRateThreshold: 0,
burnRates: [{
burnRateThreshold: 0,
timeRange: "string",
}],
timeRange: "string",
},
},
sloSliCondition: {
critical: {
sliThreshold: 0,
},
warning: {
sliThreshold: 0,
},
},
},
type: "string",
version: 0,
});
type: sumologic:Monitor
properties:
alertName: string
automatedPlaybookIds:
- string
contentType: string
createdAt: string
createdBy: string
description: string
evaluationDelay: string
groupNotifications: false
isDisabled: false
isLocked: false
isMutable: false
isSystem: false
modifiedAt: string
modifiedBy: string
monitorId: string
monitorType: string
name: string
notificationGroupFields:
- string
notifications:
- notification:
connectionId: string
connectionType: string
messageBody: string
payloadOverride: string
recipients:
- string
resolutionPayloadOverride: string
subject: string
timeZone: string
runForTriggerTypes:
- string
objPermissions:
- permissions:
- string
subjectId: string
subjectType: string
parentId: string
playbook: string
postRequestMap:
string: string
queries:
- query: string
rowId: string
sloId: string
tags:
string: string
timeZone: string
triggerConditions:
logsAnomalyCondition:
anomalyDetectorType: string
critical:
minAnomalyCount: 0
sensitivity: 0
timeRange: string
direction: string
field: string
logsMissingDataCondition:
frequency: string
timeRange: string
logsOutlierCondition:
critical:
consecutive: 0
threshold: 0
window: 0
direction: string
field: string
warning:
consecutive: 0
threshold: 0
window: 0
logsStaticCondition:
critical:
alert:
threshold: 0
thresholdType: string
frequency: string
resolution:
resolutionWindow: string
threshold: 0
thresholdType: string
timeRange: string
field: string
warning:
alert:
threshold: 0
thresholdType: string
frequency: string
resolution:
resolutionWindow: string
threshold: 0
thresholdType: string
timeRange: string
metricsAnomalyCondition:
anomalyDetectorType: string
critical:
minAnomalyCount: 0
sensitivity: 0
timeRange: string
direction: string
metricsMissingDataCondition:
timeRange: string
triggerSource: string
metricsOutlierCondition:
critical:
baselineWindow: string
threshold: 0
direction: string
warning:
baselineWindow: string
threshold: 0
metricsStaticCondition:
critical:
alert:
minDataPoints: 0
threshold: 0
thresholdType: string
occurrenceType: string
resolution:
minDataPoints: 0
occurrenceType: string
threshold: 0
thresholdType: string
timeRange: string
warning:
alert:
minDataPoints: 0
threshold: 0
thresholdType: string
occurrenceType: string
resolution:
minDataPoints: 0
occurrenceType: string
threshold: 0
thresholdType: string
timeRange: string
sloBurnRateCondition:
critical:
burnRateThreshold: 0
burnRates:
- burnRateThreshold: 0
timeRange: string
timeRange: string
warning:
burnRateThreshold: 0
burnRates:
- burnRateThreshold: 0
timeRange: string
timeRange: string
sloSliCondition:
critical:
sliThreshold: 0
warning:
sliThreshold: 0
type: string
version: 0
Monitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Monitor resource accepts the following input properties:
- Monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- Alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - Automated
Playbook List<string>Ids - Content
Type string - The type of the content object. Valid value:
Monitor
- Created
At string - Created
By string - Description string
- The description of the monitor.
- Evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- Group
Notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- Is
Disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- Is
Locked bool - Is
Mutable bool - Is
System bool - Modified
At string - Modified
By string - Monitor
Id string - The ID for this monitor.
- Name string
- The name of the monitor. The name must be alphanumeric.
- Notification
Group List<string>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - Notifications
List<Monitor
Notification> - The notifications the monitor will send when the respective trigger condition is met.
- Obj
Permissions List<MonitorObj Permission> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- Parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- Playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- Post
Request Dictionary<string, string>Map - Queries
List<Monitor
Query> - All queries from the monitor.
- Slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Dictionary<string, string>
- A map defining tag keys and tag values for the Monitor.
- Time
Zone string - Trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - Triggers
List<Monitor
Trigger> - Defines the conditions of when to send notifications.
- Type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- Version double
- Monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- Alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - Automated
Playbook []stringIds - Content
Type string - The type of the content object. Valid value:
Monitor
- Created
At string - Created
By string - Description string
- The description of the monitor.
- Evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- Group
Notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- Is
Disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- Is
Locked bool - Is
Mutable bool - Is
System bool - Modified
At string - Modified
By string - Monitor
Id string - The ID for this monitor.
- Name string
- The name of the monitor. The name must be alphanumeric.
- Notification
Group []stringFields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - Notifications
[]Monitor
Notification Args - The notifications the monitor will send when the respective trigger condition is met.
- Obj
Permissions []MonitorObj Permission Args obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- Parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- Playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- Post
Request map[string]stringMap - Queries
[]Monitor
Query Args - All queries from the monitor.
- Slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - map[string]string
- A map defining tag keys and tag values for the Monitor.
- Time
Zone string - Trigger
Conditions MonitorTrigger Conditions Args - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - Triggers
[]Monitor
Trigger Args - Defines the conditions of when to send notifications.
- Type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- Version float64
- monitor
Type String - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- alert
Name String - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook List<String>Ids - content
Type String - The type of the content object. Valid value:
Monitor
- created
At String - created
By String - description String
- The description of the monitor.
- evaluation
Delay String Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications Boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled Boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked Boolean - is
Mutable Boolean - is
System Boolean - modified
At String - modified
By String - monitor
Id String - The ID for this monitor.
- name String
- The name of the monitor. The name must be alphanumeric.
- notification
Group List<String>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
List<Monitor
Notification> - The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions List<MonitorObj Permission> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id String - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook String
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request Map<String,String>Map - queries
List<Monitor
Query> - All queries from the monitor.
- slo
Id String - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Map<String,String>
- A map defining tag keys and tag values for the Monitor.
- time
Zone String - trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
List<Monitor
Trigger> - Defines the conditions of when to send notifications.
- type String
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version Double
- monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook string[]Ids - content
Type string - The type of the content object. Valid value:
Monitor
- created
At string - created
By string - description string
- The description of the monitor.
- evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked boolean - is
Mutable boolean - is
System boolean - modified
At string - modified
By string - monitor
Id string - The ID for this monitor.
- name string
- The name of the monitor. The name must be alphanumeric.
- notification
Group string[]Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
Monitor
Notification[] - The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions MonitorObj Permission[] obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request {[key: string]: string}Map - queries
Monitor
Query[] - All queries from the monitor.
- slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - {[key: string]: string}
- A map defining tag keys and tag values for the Monitor.
- time
Zone string - trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
Monitor
Trigger[] - Defines the conditions of when to send notifications.
- type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version number
- monitor_
type str - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- alert_
name str - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated_
playbook_ Sequence[str]ids - content_
type str - The type of the content object. Valid value:
Monitor
- created_
at str - created_
by str - description str
- The description of the monitor.
- evaluation_
delay str Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group_
notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is_
disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is_
locked bool - is_
mutable bool - is_
system bool - modified_
at str - modified_
by str - monitor_
id str - The ID for this monitor.
- name str
- The name of the monitor. The name must be alphanumeric.
- notification_
group_ Sequence[str]fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
Sequence[Monitor
Notification Args] - The notifications the monitor will send when the respective trigger condition is met.
- obj_
permissions Sequence[MonitorObj Permission Args] obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent_
id str - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook str
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post_
request_ Mapping[str, str]map - queries
Sequence[Monitor
Query Args] - All queries from the monitor.
- slo_
id str - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Mapping[str, str]
- A map defining tag keys and tag values for the Monitor.
- time_
zone str - trigger_
conditions MonitorTrigger Conditions Args - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
Sequence[Monitor
Trigger Args] - Defines the conditions of when to send notifications.
- type str
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version float
- monitor
Type String - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- alert
Name String - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook List<String>Ids - content
Type String - The type of the content object. Valid value:
Monitor
- created
At String - created
By String - description String
- The description of the monitor.
- evaluation
Delay String Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications Boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled Boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked Boolean - is
Mutable Boolean - is
System Boolean - modified
At String - modified
By String - monitor
Id String - The ID for this monitor.
- name String
- The name of the monitor. The name must be alphanumeric.
- notification
Group List<String>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications List<Property Map>
- The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions List<Property Map> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id String - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook String
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request Map<String>Map - queries List<Property Map>
- All queries from the monitor.
- slo
Id String - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Map<String>
- A map defining tag keys and tag values for the Monitor.
- time
Zone String - trigger
Conditions Property Map - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers List<Property Map>
- Defines the conditions of when to send notifications.
- type String
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version Number
Outputs
All input properties are implicitly available as output properties. Additionally, the Monitor resource produces the following output properties:
Look up Existing Monitor Resource
Get an existing Monitor resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: MonitorState, opts?: CustomResourceOptions): Monitor
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alert_name: Optional[str] = None,
automated_playbook_ids: Optional[Sequence[str]] = None,
content_type: Optional[str] = None,
created_at: Optional[str] = None,
created_by: Optional[str] = None,
description: Optional[str] = None,
evaluation_delay: Optional[str] = None,
group_notifications: Optional[bool] = None,
is_disabled: Optional[bool] = None,
is_locked: Optional[bool] = None,
is_mutable: Optional[bool] = None,
is_system: Optional[bool] = None,
modified_at: Optional[str] = None,
modified_by: Optional[str] = None,
monitor_id: Optional[str] = None,
monitor_type: Optional[str] = None,
name: Optional[str] = None,
notification_group_fields: Optional[Sequence[str]] = None,
notifications: Optional[Sequence[MonitorNotificationArgs]] = None,
obj_permissions: Optional[Sequence[MonitorObjPermissionArgs]] = None,
parent_id: Optional[str] = None,
playbook: Optional[str] = None,
post_request_map: Optional[Mapping[str, str]] = None,
queries: Optional[Sequence[MonitorQueryArgs]] = None,
slo_id: Optional[str] = None,
statuses: Optional[Sequence[str]] = None,
tags: Optional[Mapping[str, str]] = None,
time_zone: Optional[str] = None,
trigger_conditions: Optional[MonitorTriggerConditionsArgs] = None,
triggers: Optional[Sequence[MonitorTriggerArgs]] = None,
type: Optional[str] = None,
version: Optional[float] = None) -> Monitor
func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)
public static Monitor Get(string name, Input<string> id, MonitorState? state, CustomResourceOptions? opts = null)
public static Monitor get(String name, Output<String> id, MonitorState state, CustomResourceOptions options)
resources: _: type: sumologic:Monitor get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - Automated
Playbook List<string>Ids - Content
Type string - The type of the content object. Valid value:
Monitor
- Created
At string - Created
By string - Description string
- The description of the monitor.
- Evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- Group
Notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- Is
Disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- Is
Locked bool - Is
Mutable bool - Is
System bool - Modified
At string - Modified
By string - Monitor
Id string - The ID for this monitor.
- Monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- Name string
- The name of the monitor. The name must be alphanumeric.
- Notification
Group List<string>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - Notifications
List<Monitor
Notification> - The notifications the monitor will send when the respective trigger condition is met.
- Obj
Permissions List<MonitorObj Permission> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- Parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- Playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- Post
Request Dictionary<string, string>Map - Queries
List<Monitor
Query> - All queries from the monitor.
- Slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Statuses List<string>
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- Dictionary<string, string>
- A map defining tag keys and tag values for the Monitor.
- Time
Zone string - Trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - Triggers
List<Monitor
Trigger> - Defines the conditions of when to send notifications.
- Type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- Version double
- Alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - Automated
Playbook []stringIds - Content
Type string - The type of the content object. Valid value:
Monitor
- Created
At string - Created
By string - Description string
- The description of the monitor.
- Evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- Group
Notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- Is
Disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- Is
Locked bool - Is
Mutable bool - Is
System bool - Modified
At string - Modified
By string - Monitor
Id string - The ID for this monitor.
- Monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- Name string
- The name of the monitor. The name must be alphanumeric.
- Notification
Group []stringFields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - Notifications
[]Monitor
Notification Args - The notifications the monitor will send when the respective trigger condition is met.
- Obj
Permissions []MonitorObj Permission Args obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- Parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- Playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- Post
Request map[string]stringMap - Queries
[]Monitor
Query Args - All queries from the monitor.
- Slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - Statuses []string
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- map[string]string
- A map defining tag keys and tag values for the Monitor.
- Time
Zone string - Trigger
Conditions MonitorTrigger Conditions Args - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - Triggers
[]Monitor
Trigger Args - Defines the conditions of when to send notifications.
- Type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- Version float64
- alert
Name String - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook List<String>Ids - content
Type String - The type of the content object. Valid value:
Monitor
- created
At String - created
By String - description String
- The description of the monitor.
- evaluation
Delay String Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications Boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled Boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked Boolean - is
Mutable Boolean - is
System Boolean - modified
At String - modified
By String - monitor
Id String - The ID for this monitor.
- monitor
Type String - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- name String
- The name of the monitor. The name must be alphanumeric.
- notification
Group List<String>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
List<Monitor
Notification> - The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions List<MonitorObj Permission> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id String - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook String
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request Map<String,String>Map - queries
List<Monitor
Query> - All queries from the monitor.
- slo
Id String - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - statuses List<String>
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- Map<String,String>
- A map defining tag keys and tag values for the Monitor.
- time
Zone String - trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
List<Monitor
Trigger> - Defines the conditions of when to send notifications.
- type String
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version Double
- alert
Name string - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook string[]Ids - content
Type string - The type of the content object. Valid value:
Monitor
- created
At string - created
By string - description string
- The description of the monitor.
- evaluation
Delay string Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked boolean - is
Mutable boolean - is
System boolean - modified
At string - modified
By string - monitor
Id string - The ID for this monitor.
- monitor
Type string - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- name string
- The name of the monitor. The name must be alphanumeric.
- notification
Group string[]Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
Monitor
Notification[] - The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions MonitorObj Permission[] obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id string - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook string
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request {[key: string]: string}Map - queries
Monitor
Query[] - All queries from the monitor.
- slo
Id string - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - statuses string[]
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- {[key: string]: string}
- A map defining tag keys and tag values for the Monitor.
- time
Zone string - trigger
Conditions MonitorTrigger Conditions - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
Monitor
Trigger[] - Defines the conditions of when to send notifications.
- type string
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version number
- alert_
name str - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated_
playbook_ Sequence[str]ids - content_
type str - The type of the content object. Valid value:
Monitor
- created_
at str - created_
by str - description str
- The description of the monitor.
- evaluation_
delay str Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group_
notifications bool - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is_
disabled bool - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is_
locked bool - is_
mutable bool - is_
system bool - modified_
at str - modified_
by str - monitor_
id str - The ID for this monitor.
- monitor_
type str - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- name str
- The name of the monitor. The name must be alphanumeric.
- notification_
group_ Sequence[str]fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications
Sequence[Monitor
Notification Args] - The notifications the monitor will send when the respective trigger condition is met.
- obj_
permissions Sequence[MonitorObj Permission Args] obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent_
id str - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook str
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post_
request_ Mapping[str, str]map - queries
Sequence[Monitor
Query Args] - All queries from the monitor.
- slo_
id str - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - statuses Sequence[str]
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- Mapping[str, str]
- A map defining tag keys and tag values for the Monitor.
- time_
zone str - trigger_
conditions MonitorTrigger Conditions Args - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers
Sequence[Monitor
Trigger Args] - Defines the conditions of when to send notifications.
- type str
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version float
- alert
Name String - The display name when creating alerts. Monitor name will be used if
alert_name
is not provided. All template variables can be used inalert_name
except{{AlertName}}
,{{AlertResponseURL}}
,{{ResultsJson}}
, and{{Playbook}}
. - automated
Playbook List<String>Ids - content
Type String - The type of the content object. Valid value:
Monitor
- created
At String - created
By String - description String
- The description of the monitor.
- evaluation
Delay String Evaluation delay as a string consists of the following elements:
<number>
: number of time units,<time_unit>
: time unit; possible values are:h
(hour),m
(minute),s
(second).
Multiple pairs of
<number><time_unit>
may be provided. For example,2m50s
means 2 minutes and 50 seconds.- group
Notifications Boolean - Whether or not to group notifications for individual items that meet the trigger condition. Defaults to true.
- is
Disabled Boolean - Whether or not the monitor is disabled. Disabled monitors will not run and will not generate or send notifications.
- is
Locked Boolean - is
Mutable Boolean - is
System Boolean - modified
At String - modified
By String - monitor
Id String - The ID for this monitor.
- monitor
Type String - The type of monitor. Valid values:
Logs
: A logs query monitor.Metrics
: A metrics query monitor.Slo
: A SLO based monitor.
- name String
- The name of the monitor. The name must be alphanumeric.
- notification
Group List<String>Fields - The set of fields to be used to group alerts and notifications for a monitor. The value of this field will be considered only when 'groupNotifications' is true. The fields with very high cardinality such as
_blockid
,_raw
,_messagetime
,_receipttime
, and_messageid
are not allowed for Alert Grouping. - notifications List<Property Map>
- The notifications the monitor will send when the respective trigger condition is met.
- obj
Permissions List<Property Map> obj_permission
construct represents a Permission Statement associated with this Monitor. A set ofobj_permission
constructs can be specified under a Monitor. Anobj_permission
construct can be used to control permissions Explicitly associated with a Monitor. But, it cannot be used to control permissions Inherited from a Parent / Ancestor. Default FGP would be still set to the Monitor upon creation (e.g. the creating user would have full permission), even if noobj_permission
construct is specified at a Monitor and the FGP feature is enabled at the account.- parent
Id String - The ID of the Monitor Folder that contains this monitor. Defaults to the root folder.
- playbook String
- Notes such as links and instruction to help you resolve alerts triggered by this monitor. {{Markdown}} supported. It will be enabled only if available for your organization. Please contact your Sumo Logic account team to learn more.
- post
Request Map<String>Map - queries List<Property Map>
- All queries from the monitor.
- slo
Id String - Identifier of the SLO definition for the monitor. This is only applicable & required for Slo
monitor_type
. - statuses List<String>
- The current status for this monitor. Values are:
Critical
Warning
MissingData
Normal
Disabled
- Map<String>
- A map defining tag keys and tag values for the Monitor.
- time
Zone String - trigger
Conditions Property Map - Defines the conditions of when to send notifications. NOTE:
trigger_conditions
supplants thetriggers
argument. - triggers List<Property Map>
- Defines the conditions of when to send notifications.
- type String
- The type of object model. Valid value:
MonitorsLibraryMonitor
- version Number
Supporting Types
MonitorNotification, MonitorNotificationArgs
- notification Property Map
- run
For List<String>Trigger Types
MonitorNotificationNotification, MonitorNotificationNotificationArgs
- Action
Type string - Connection
Id string - Connection
Type string - Message
Body string - Payload
Override string - Recipients List<string>
- Resolution
Payload stringOverride - Subject string
- Time
Zone string
- Action
Type string - Connection
Id string - Connection
Type string - Message
Body string - Payload
Override string - Recipients []string
- Resolution
Payload stringOverride - Subject string
- Time
Zone string
- action
Type String - connection
Id String - connection
Type String - message
Body String - payload
Override String - recipients List<String>
- resolution
Payload StringOverride - subject String
- time
Zone String
- action
Type string - connection
Id string - connection
Type string - message
Body string - payload
Override string - recipients string[]
- resolution
Payload stringOverride - subject string
- time
Zone string
- action_
type str - connection_
id str - connection_
type str - message_
body str - payload_
override str - recipients Sequence[str]
- resolution_
payload_ stroverride - subject str
- time_
zone str
- action
Type String - connection
Id String - connection
Type String - message
Body String - payload
Override String - recipients List<String>
- resolution
Payload StringOverride - subject String
- time
Zone String
MonitorObjPermission, MonitorObjPermissionArgs
- Permissions List<string>
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- Subject
Id string - A Role ID or the Org ID of the account
- Subject
Type string - Valid values:
- Permissions []string
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- Subject
Id string - A Role ID or the Org ID of the account
- Subject
Type string - Valid values:
- permissions List<String>
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- subject
Id String - A Role ID or the Org ID of the account
- subject
Type String - Valid values:
- permissions string[]
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- subject
Id string - A Role ID or the Org ID of the account
- subject
Type string - Valid values:
- permissions Sequence[str]
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- subject_
id str - A Role ID or the Org ID of the account
- subject_
type str - Valid values:
- permissions List<String>
A Set of Permissions. Valid Permission Values:
Read
Update
Delete
Manage
Additional data provided in state:
- subject
Id String - A Role ID or the Org ID of the account
- subject
Type String - Valid values:
MonitorQuery, MonitorQueryArgs
MonitorTrigger, MonitorTriggerArgs
- Time
Range string - Detection
Method string - Frequency string
- Min
Data doublePoints - Occurrence
Type string - Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold double
- Threshold
Type string - Trigger
Source string - Trigger
Type string
- Time
Range string - Detection
Method string - Frequency string
- Min
Data float64Points - Occurrence
Type string - Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold float64
- Threshold
Type string - Trigger
Source string - Trigger
Type string
- time
Range String - detection
Method String - frequency String
- min
Data DoublePoints - occurrence
Type String - resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Double
- threshold
Type String - trigger
Source String - trigger
Type String
- time
Range string - detection
Method string - frequency string
- min
Data numberPoints - occurrence
Type string - resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold number
- threshold
Type string - trigger
Source string - trigger
Type string
- time_
range str - detection_
method str - frequency str
- min_
data_ floatpoints - occurrence_
type str - resolution_
window str - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold float
- threshold_
type str - trigger_
source str - trigger_
type str
- time
Range String - detection
Method String - frequency String
- min
Data NumberPoints - occurrence
Type String - resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Number
- threshold
Type String - trigger
Source String - trigger
Type String
MonitorTriggerConditions, MonitorTriggerConditionsArgs
- Logs
Anomaly MonitorCondition Trigger Conditions Logs Anomaly Condition - Logs
Missing MonitorData Condition Trigger Conditions Logs Missing Data Condition - Logs
Outlier MonitorCondition Trigger Conditions Logs Outlier Condition - Logs
Static MonitorCondition Trigger Conditions Logs Static Condition - Metrics
Anomaly MonitorCondition Trigger Conditions Metrics Anomaly Condition - Metrics
Missing MonitorData Condition Trigger Conditions Metrics Missing Data Condition - Metrics
Outlier MonitorCondition Trigger Conditions Metrics Outlier Condition - Metrics
Static MonitorCondition Trigger Conditions Metrics Static Condition - Slo
Burn MonitorRate Condition Trigger Conditions Slo Burn Rate Condition - Slo
Sli MonitorCondition Trigger Conditions Slo Sli Condition
- Logs
Anomaly MonitorCondition Trigger Conditions Logs Anomaly Condition - Logs
Missing MonitorData Condition Trigger Conditions Logs Missing Data Condition - Logs
Outlier MonitorCondition Trigger Conditions Logs Outlier Condition - Logs
Static MonitorCondition Trigger Conditions Logs Static Condition - Metrics
Anomaly MonitorCondition Trigger Conditions Metrics Anomaly Condition - Metrics
Missing MonitorData Condition Trigger Conditions Metrics Missing Data Condition - Metrics
Outlier MonitorCondition Trigger Conditions Metrics Outlier Condition - Metrics
Static MonitorCondition Trigger Conditions Metrics Static Condition - Slo
Burn MonitorRate Condition Trigger Conditions Slo Burn Rate Condition - Slo
Sli MonitorCondition Trigger Conditions Slo Sli Condition
- logs
Anomaly MonitorCondition Trigger Conditions Logs Anomaly Condition - logs
Missing MonitorData Condition Trigger Conditions Logs Missing Data Condition - logs
Outlier MonitorCondition Trigger Conditions Logs Outlier Condition - logs
Static MonitorCondition Trigger Conditions Logs Static Condition - metrics
Anomaly MonitorCondition Trigger Conditions Metrics Anomaly Condition - metrics
Missing MonitorData Condition Trigger Conditions Metrics Missing Data Condition - metrics
Outlier MonitorCondition Trigger Conditions Metrics Outlier Condition - metrics
Static MonitorCondition Trigger Conditions Metrics Static Condition - slo
Burn MonitorRate Condition Trigger Conditions Slo Burn Rate Condition - slo
Sli MonitorCondition Trigger Conditions Slo Sli Condition
- logs
Anomaly MonitorCondition Trigger Conditions Logs Anomaly Condition - logs
Missing MonitorData Condition Trigger Conditions Logs Missing Data Condition - logs
Outlier MonitorCondition Trigger Conditions Logs Outlier Condition - logs
Static MonitorCondition Trigger Conditions Logs Static Condition - metrics
Anomaly MonitorCondition Trigger Conditions Metrics Anomaly Condition - metrics
Missing MonitorData Condition Trigger Conditions Metrics Missing Data Condition - metrics
Outlier MonitorCondition Trigger Conditions Metrics Outlier Condition - metrics
Static MonitorCondition Trigger Conditions Metrics Static Condition - slo
Burn MonitorRate Condition Trigger Conditions Slo Burn Rate Condition - slo
Sli MonitorCondition Trigger Conditions Slo Sli Condition
- logs_
anomaly_ Monitorcondition Trigger Conditions Logs Anomaly Condition - logs_
missing_ Monitordata_ condition Trigger Conditions Logs Missing Data Condition - logs_
outlier_ Monitorcondition Trigger Conditions Logs Outlier Condition - logs_
static_ Monitorcondition Trigger Conditions Logs Static Condition - metrics_
anomaly_ Monitorcondition Trigger Conditions Metrics Anomaly Condition - metrics_
missing_ Monitordata_ condition Trigger Conditions Metrics Missing Data Condition - metrics_
outlier_ Monitorcondition Trigger Conditions Metrics Outlier Condition - metrics_
static_ Monitorcondition Trigger Conditions Metrics Static Condition - slo_
burn_ Monitorrate_ condition Trigger Conditions Slo Burn Rate Condition - slo_
sli_ Monitorcondition Trigger Conditions Slo Sli Condition
- logs
Anomaly Property MapCondition - logs
Missing Property MapData Condition - logs
Outlier Property MapCondition - logs
Static Property MapCondition - metrics
Anomaly Property MapCondition - metrics
Missing Property MapData Condition - metrics
Outlier Property MapCondition - metrics
Static Property MapCondition - slo
Burn Property MapRate Condition - slo
Sli Property MapCondition
MonitorTriggerConditionsLogsAnomalyCondition, MonitorTriggerConditionsLogsAnomalyConditionArgs
- anomaly
Detector StringType - critical Property Map
- field String
- direction String
MonitorTriggerConditionsLogsAnomalyConditionCritical, MonitorTriggerConditionsLogsAnomalyConditionCriticalArgs
- Time
Range string - Min
Anomaly doubleCount - Sensitivity double
- Time
Range string - Min
Anomaly float64Count - Sensitivity float64
- time
Range String - min
Anomaly DoubleCount - sensitivity Double
- time
Range string - min
Anomaly numberCount - sensitivity number
- time_
range str - min_
anomaly_ floatcount - sensitivity float
- time
Range String - min
Anomaly NumberCount - sensitivity Number
MonitorTriggerConditionsLogsMissingDataCondition, MonitorTriggerConditionsLogsMissingDataConditionArgs
- time_
range str - frequency str
MonitorTriggerConditionsLogsOutlierCondition, MonitorTriggerConditionsLogsOutlierConditionArgs
- critical Property Map
- direction String
- field String
- warning Property Map
MonitorTriggerConditionsLogsOutlierConditionCritical, MonitorTriggerConditionsLogsOutlierConditionCriticalArgs
- Consecutive double
- Threshold double
- Window double
- Consecutive float64
- Threshold float64
- Window float64
- consecutive Double
- threshold Double
- window Double
- consecutive number
- threshold number
- window number
- consecutive float
- threshold float
- window float
- consecutive Number
- threshold Number
- window Number
MonitorTriggerConditionsLogsOutlierConditionWarning, MonitorTriggerConditionsLogsOutlierConditionWarningArgs
- Consecutive double
- Threshold double
- Window double
- Consecutive float64
- Threshold float64
- Window float64
- consecutive Double
- threshold Double
- window Double
- consecutive number
- threshold number
- window number
- consecutive float
- threshold float
- window float
- consecutive Number
- threshold Number
- window Number
MonitorTriggerConditionsLogsStaticCondition, MonitorTriggerConditionsLogsStaticConditionArgs
MonitorTriggerConditionsLogsStaticConditionCritical, MonitorTriggerConditionsLogsStaticConditionCriticalArgs
- alert Property Map
- resolution Property Map
- time
Range String - frequency String
MonitorTriggerConditionsLogsStaticConditionCriticalAlert, MonitorTriggerConditionsLogsStaticConditionCriticalAlertArgs
- Threshold double
- Threshold
Type string
- Threshold float64
- Threshold
Type string
- threshold Double
- threshold
Type String
- threshold number
- threshold
Type string
- threshold float
- threshold_
type str
- threshold Number
- threshold
Type String
MonitorTriggerConditionsLogsStaticConditionCriticalResolution, MonitorTriggerConditionsLogsStaticConditionCriticalResolutionArgs
- Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold double
- Threshold
Type string
- Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold float64
- Threshold
Type string
- resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Double
- threshold
Type String
- resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold number
- threshold
Type string
- resolution_
window str - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold float
- threshold_
type str
- resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Number
- threshold
Type String
MonitorTriggerConditionsLogsStaticConditionWarning, MonitorTriggerConditionsLogsStaticConditionWarningArgs
- alert Property Map
- resolution Property Map
- time
Range String - frequency String
MonitorTriggerConditionsLogsStaticConditionWarningAlert, MonitorTriggerConditionsLogsStaticConditionWarningAlertArgs
- Threshold double
- Threshold
Type string
- Threshold float64
- Threshold
Type string
- threshold Double
- threshold
Type String
- threshold number
- threshold
Type string
- threshold float
- threshold_
type str
- threshold Number
- threshold
Type String
MonitorTriggerConditionsLogsStaticConditionWarningResolution, MonitorTriggerConditionsLogsStaticConditionWarningResolutionArgs
- Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold double
- Threshold
Type string
- Resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- Threshold float64
- Threshold
Type string
- resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Double
- threshold
Type String
- resolution
Window string - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold number
- threshold
Type string
- resolution_
window str - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold float
- threshold_
type str
- resolution
Window String - The resolution window that the recovery condition must be met in each evaluation that happens within this entire duration before the alert is recovered (resolved). If not specified, the time range of your trigger will be used.
- threshold Number
- threshold
Type String
MonitorTriggerConditionsMetricsAnomalyCondition, MonitorTriggerConditionsMetricsAnomalyConditionArgs
- anomaly
Detector StringType - critical Property Map
- direction String
MonitorTriggerConditionsMetricsAnomalyConditionCritical, MonitorTriggerConditionsMetricsAnomalyConditionCriticalArgs
- Time
Range string - Min
Anomaly doubleCount - Sensitivity double
- Time
Range string - Min
Anomaly float64Count - Sensitivity float64
- time
Range String - min
Anomaly DoubleCount - sensitivity Double
- time
Range string - min
Anomaly numberCount - sensitivity number
- time_
range str - min_
anomaly_ floatcount - sensitivity float
- time
Range String - min
Anomaly NumberCount - sensitivity Number
MonitorTriggerConditionsMetricsMissingDataCondition, MonitorTriggerConditionsMetricsMissingDataConditionArgs
- Time
Range string - Trigger
Source string
- Time
Range string - Trigger
Source string
- time
Range String - trigger
Source String
- time
Range string - trigger
Source string
- time_
range str - trigger_
source str
- time
Range String - trigger
Source String
MonitorTriggerConditionsMetricsOutlierCondition, MonitorTriggerConditionsMetricsOutlierConditionArgs
MonitorTriggerConditionsMetricsOutlierConditionCritical, MonitorTriggerConditionsMetricsOutlierConditionCriticalArgs
- Baseline
Window string - Threshold double
- Baseline
Window string - Threshold float64
- baseline
Window String - threshold Double
- baseline
Window string - threshold number
- baseline_
window str - threshold float
- baseline
Window String - threshold Number
MonitorTriggerConditionsMetricsOutlierConditionWarning, MonitorTriggerConditionsMetricsOutlierConditionWarningArgs
- Baseline
Window string - Threshold double
- Baseline
Window string - Threshold float64
- baseline
Window String - threshold Double
- baseline
Window string - threshold number
- baseline_
window str - threshold float
- baseline
Window String - threshold Number
MonitorTriggerConditionsMetricsStaticCondition, MonitorTriggerConditionsMetricsStaticConditionArgs
MonitorTriggerConditionsMetricsStaticConditionCritical, MonitorTriggerConditionsMetricsStaticConditionCriticalArgs
- alert Property Map
- occurrence
Type String - resolution Property Map
- time
Range String
MonitorTriggerConditionsMetricsStaticConditionCriticalAlert, MonitorTriggerConditionsMetricsStaticConditionCriticalAlertArgs
- Min
Data doublePoints - Threshold double
- Threshold
Type string
- Min
Data float64Points - Threshold float64
- Threshold
Type string
- min
Data DoublePoints - threshold Double
- threshold
Type String
- min
Data numberPoints - threshold number
- threshold
Type string
- min_
data_ floatpoints - threshold float
- threshold_
type str
- min
Data NumberPoints - threshold Number
- threshold
Type String
MonitorTriggerConditionsMetricsStaticConditionCriticalResolution, MonitorTriggerConditionsMetricsStaticConditionCriticalResolutionArgs
- Min
Data doublePoints - Occurrence
Type string - Threshold double
- Threshold
Type string
- Min
Data float64Points - Occurrence
Type string - Threshold float64
- Threshold
Type string
- min
Data DoublePoints - occurrence
Type String - threshold Double
- threshold
Type String
- min
Data numberPoints - occurrence
Type string - threshold number
- threshold
Type string
- min_
data_ floatpoints - occurrence_
type str - threshold float
- threshold_
type str
- min
Data NumberPoints - occurrence
Type String - threshold Number
- threshold
Type String
MonitorTriggerConditionsMetricsStaticConditionWarning, MonitorTriggerConditionsMetricsStaticConditionWarningArgs
- alert Property Map
- occurrence
Type String - resolution Property Map
- time
Range String
MonitorTriggerConditionsMetricsStaticConditionWarningAlert, MonitorTriggerConditionsMetricsStaticConditionWarningAlertArgs
- Min
Data doublePoints - Threshold double
- Threshold
Type string
- Min
Data float64Points - Threshold float64
- Threshold
Type string
- min
Data DoublePoints - threshold Double
- threshold
Type String
- min
Data numberPoints - threshold number
- threshold
Type string
- min_
data_ floatpoints - threshold float
- threshold_
type str
- min
Data NumberPoints - threshold Number
- threshold
Type String
MonitorTriggerConditionsMetricsStaticConditionWarningResolution, MonitorTriggerConditionsMetricsStaticConditionWarningResolutionArgs
- Min
Data doublePoints - Occurrence
Type string - Threshold double
- Threshold
Type string
- Min
Data float64Points - Occurrence
Type string - Threshold float64
- Threshold
Type string
- min
Data DoublePoints - occurrence
Type String - threshold Double
- threshold
Type String
- min
Data numberPoints - occurrence
Type string - threshold number
- threshold
Type string
- min_
data_ floatpoints - occurrence_
type str - threshold float
- threshold_
type str
- min
Data NumberPoints - occurrence
Type String - threshold Number
- threshold
Type String
MonitorTriggerConditionsSloBurnRateCondition, MonitorTriggerConditionsSloBurnRateConditionArgs
MonitorTriggerConditionsSloBurnRateConditionCritical, MonitorTriggerConditionsSloBurnRateConditionCriticalArgs
- burn
Rate NumberThreshold - burn
Rates List<Property Map> - time
Range String
MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRate, MonitorTriggerConditionsSloBurnRateConditionCriticalBurnRateArgs
- Burn
Rate doubleThreshold - Time
Range string
- Burn
Rate float64Threshold - Time
Range string
- burn
Rate DoubleThreshold - time
Range String
- burn
Rate numberThreshold - time
Range string
- burn_
rate_ floatthreshold - time_
range str
- burn
Rate NumberThreshold - time
Range String
MonitorTriggerConditionsSloBurnRateConditionWarning, MonitorTriggerConditionsSloBurnRateConditionWarningArgs
- burn
Rate NumberThreshold - burn
Rates List<Property Map> - time
Range String
MonitorTriggerConditionsSloBurnRateConditionWarningBurnRate, MonitorTriggerConditionsSloBurnRateConditionWarningBurnRateArgs
- Burn
Rate doubleThreshold - Time
Range string
- Burn
Rate float64Threshold - Time
Range string
- burn
Rate DoubleThreshold - time
Range String
- burn
Rate numberThreshold - time
Range string
- burn_
rate_ floatthreshold - time_
range str
- burn
Rate NumberThreshold - time
Range String
MonitorTriggerConditionsSloSliCondition, MonitorTriggerConditionsSloSliConditionArgs
MonitorTriggerConditionsSloSliConditionCritical, MonitorTriggerConditionsSloSliConditionCriticalArgs
- Sli
Threshold double
- Sli
Threshold float64
- sli
Threshold Double
- sli
Threshold number
- sli_
threshold float
- sli
Threshold Number
MonitorTriggerConditionsSloSliConditionWarning, MonitorTriggerConditionsSloSliConditionWarningArgs
- Sli
Threshold double
- Sli
Threshold float64
- sli
Threshold Double
- sli
Threshold number
- sli_
threshold float
- sli
Threshold Number
Import
Monitors can be imported using the monitor ID, such as:
hcl
$ pulumi import sumologic:index/monitor:Monitor test 1234567890
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Sumo Logic sumologic/terraform-provider-sumologic
- License
- Notes
- This Pulumi package is based on the
sumologic
Terraform Provider.