1. Packages
  2. Sysdig Provider
  3. API Docs
  4. MonitorAlertV2Metric
sysdig 2.1.0 published on Tuesday, Oct 7, 2025 by sysdiglabs

sysdig.MonitorAlertV2Metric

Deploy with Pulumi
sysdig logo
sysdig 2.1.0 published on Tuesday, Oct 7, 2025 by sysdiglabs

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as sysdig from "@pulumi/sysdig";
    
    const sample = new sysdig.MonitorAlertV2Metric("sample", {
        customNotification: {
            additionalFields: [
                {
                    name: "pod",
                    value: "{{kube_pod_name}}",
                },
                {
                    name: "cluster",
                    value: "{{kube_cluster_name}}",
                },
            ],
            append: "Please investigate the issue. Escalate to the on-call team if needed.",
            prepend: "Attention!!",
            subject: "{{__alert_name__}} for pod {{kube_pod_name}}",
        },
        groupAggregation: "avg",
        groupBies: ["kube_pod_name"],
        metric: "sysdig_container_cpu_used_percent",
        notificationChannels: [{
            id: 1234,
            renotifyEveryMinutes: 60,
        }],
        operator: ">",
        rangeSeconds: 60,
        scopes: [
            {
                label: "kube_cluster_name",
                operator: "in",
                values: [
                    "my_cluster_1",
                    "my_cluster_2",
                ],
            },
            {
                label: "kube_deployment_name",
                operator: "equals",
                values: ["my_deployment"],
            },
        ],
        severity: "high",
        threshold: 75,
        timeAggregation: "avg",
    });
    
    import pulumi
    import pulumi_sysdig as sysdig
    
    sample = sysdig.MonitorAlertV2Metric("sample",
        custom_notification={
            "additional_fields": [
                {
                    "name": "pod",
                    "value": "{{kube_pod_name}}",
                },
                {
                    "name": "cluster",
                    "value": "{{kube_cluster_name}}",
                },
            ],
            "append": "Please investigate the issue. Escalate to the on-call team if needed.",
            "prepend": "Attention!!",
            "subject": "{{__alert_name__}} for pod {{kube_pod_name}}",
        },
        group_aggregation="avg",
        group_bies=["kube_pod_name"],
        metric="sysdig_container_cpu_used_percent",
        notification_channels=[{
            "id": 1234,
            "renotify_every_minutes": 60,
        }],
        operator=">",
        range_seconds=60,
        scopes=[
            {
                "label": "kube_cluster_name",
                "operator": "in",
                "values": [
                    "my_cluster_1",
                    "my_cluster_2",
                ],
            },
            {
                "label": "kube_deployment_name",
                "operator": "equals",
                "values": ["my_deployment"],
            },
        ],
        severity="high",
        threshold=75,
        time_aggregation="avg")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/sysdig/v2/sysdig"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := sysdig.NewMonitorAlertV2Metric(ctx, "sample", &sysdig.MonitorAlertV2MetricArgs{
    			CustomNotification: &sysdig.MonitorAlertV2MetricCustomNotificationArgs{
    				AdditionalFields: sysdig.MonitorAlertV2MetricCustomNotificationAdditionalFieldArray{
    					&sysdig.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs{
    						Name:  pulumi.String("pod"),
    						Value: pulumi.String("{{kube_pod_name}}"),
    					},
    					&sysdig.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs{
    						Name:  pulumi.String("cluster"),
    						Value: pulumi.String("{{kube_cluster_name}}"),
    					},
    				},
    				Append:  pulumi.String("Please investigate the issue. Escalate to the on-call team if needed."),
    				Prepend: pulumi.String("Attention!!"),
    				Subject: pulumi.String("{{__alert_name__}} for pod {{kube_pod_name}}"),
    			},
    			GroupAggregation: pulumi.String("avg"),
    			GroupBies: pulumi.StringArray{
    				pulumi.String("kube_pod_name"),
    			},
    			Metric: pulumi.String("sysdig_container_cpu_used_percent"),
    			NotificationChannels: sysdig.MonitorAlertV2MetricNotificationChannelArray{
    				&sysdig.MonitorAlertV2MetricNotificationChannelArgs{
    					Id:                   pulumi.Float64(1234),
    					RenotifyEveryMinutes: pulumi.Float64(60),
    				},
    			},
    			Operator:     pulumi.String(">"),
    			RangeSeconds: pulumi.Float64(60),
    			Scopes: sysdig.MonitorAlertV2MetricScopeArray{
    				&sysdig.MonitorAlertV2MetricScopeArgs{
    					Label:    pulumi.String("kube_cluster_name"),
    					Operator: pulumi.String("in"),
    					Values: pulumi.StringArray{
    						pulumi.String("my_cluster_1"),
    						pulumi.String("my_cluster_2"),
    					},
    				},
    				&sysdig.MonitorAlertV2MetricScopeArgs{
    					Label:    pulumi.String("kube_deployment_name"),
    					Operator: pulumi.String("equals"),
    					Values: pulumi.StringArray{
    						pulumi.String("my_deployment"),
    					},
    				},
    			},
    			Severity:        pulumi.String("high"),
    			Threshold:       pulumi.Float64(75),
    			TimeAggregation: pulumi.String("avg"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Sysdig = Pulumi.Sysdig;
    
    return await Deployment.RunAsync(() => 
    {
        var sample = new Sysdig.MonitorAlertV2Metric("sample", new()
        {
            CustomNotification = new Sysdig.Inputs.MonitorAlertV2MetricCustomNotificationArgs
            {
                AdditionalFields = new[]
                {
                    new Sysdig.Inputs.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs
                    {
                        Name = "pod",
                        Value = "{{kube_pod_name}}",
                    },
                    new Sysdig.Inputs.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs
                    {
                        Name = "cluster",
                        Value = "{{kube_cluster_name}}",
                    },
                },
                Append = "Please investigate the issue. Escalate to the on-call team if needed.",
                Prepend = "Attention!!",
                Subject = "{{__alert_name__}} for pod {{kube_pod_name}}",
            },
            GroupAggregation = "avg",
            GroupBies = new[]
            {
                "kube_pod_name",
            },
            Metric = "sysdig_container_cpu_used_percent",
            NotificationChannels = new[]
            {
                new Sysdig.Inputs.MonitorAlertV2MetricNotificationChannelArgs
                {
                    Id = 1234,
                    RenotifyEveryMinutes = 60,
                },
            },
            Operator = ">",
            RangeSeconds = 60,
            Scopes = new[]
            {
                new Sysdig.Inputs.MonitorAlertV2MetricScopeArgs
                {
                    Label = "kube_cluster_name",
                    Operator = "in",
                    Values = new[]
                    {
                        "my_cluster_1",
                        "my_cluster_2",
                    },
                },
                new Sysdig.Inputs.MonitorAlertV2MetricScopeArgs
                {
                    Label = "kube_deployment_name",
                    Operator = "equals",
                    Values = new[]
                    {
                        "my_deployment",
                    },
                },
            },
            Severity = "high",
            Threshold = 75,
            TimeAggregation = "avg",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.sysdig.MonitorAlertV2Metric;
    import com.pulumi.sysdig.MonitorAlertV2MetricArgs;
    import com.pulumi.sysdig.inputs.MonitorAlertV2MetricCustomNotificationArgs;
    import com.pulumi.sysdig.inputs.MonitorAlertV2MetricNotificationChannelArgs;
    import com.pulumi.sysdig.inputs.MonitorAlertV2MetricScopeArgs;
    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 sample = new MonitorAlertV2Metric("sample", MonitorAlertV2MetricArgs.builder()
                .customNotification(MonitorAlertV2MetricCustomNotificationArgs.builder()
                    .additionalFields(                
                        MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs.builder()
                            .name("pod")
                            .value("{{kube_pod_name}}")
                            .build(),
                        MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs.builder()
                            .name("cluster")
                            .value("{{kube_cluster_name}}")
                            .build())
                    .append("Please investigate the issue. Escalate to the on-call team if needed.")
                    .prepend("Attention!!")
                    .subject("{{__alert_name__}} for pod {{kube_pod_name}}")
                    .build())
                .groupAggregation("avg")
                .groupBies("kube_pod_name")
                .metric("sysdig_container_cpu_used_percent")
                .notificationChannels(MonitorAlertV2MetricNotificationChannelArgs.builder()
                    .id(1234)
                    .renotifyEveryMinutes(60)
                    .build())
                .operator(">")
                .rangeSeconds(60)
                .scopes(            
                    MonitorAlertV2MetricScopeArgs.builder()
                        .label("kube_cluster_name")
                        .operator("in")
                        .values(                    
                            "my_cluster_1",
                            "my_cluster_2")
                        .build(),
                    MonitorAlertV2MetricScopeArgs.builder()
                        .label("kube_deployment_name")
                        .operator("equals")
                        .values("my_deployment")
                        .build())
                .severity("high")
                .threshold(75)
                .timeAggregation("avg")
                .build());
    
        }
    }
    
    resources:
      sample:
        type: sysdig:MonitorAlertV2Metric
        properties:
          customNotification:
            additionalFields:
              - name: pod
                value: '{{kube_pod_name}}'
              - name: cluster
                value: '{{kube_cluster_name}}'
            append: Please investigate the issue. Escalate to the on-call team if needed.
            prepend: Attention!!
            subject: '{{__alert_name__}} for pod {{kube_pod_name}}'
          groupAggregation: avg
          groupBies:
            - kube_pod_name
          metric: sysdig_container_cpu_used_percent
          notificationChannels:
            - id: 1234
              renotifyEveryMinutes: 60
          operator: '>'
          rangeSeconds: 60
          scopes:
            - label: kube_cluster_name
              operator: in
              values:
                - my_cluster_1
                - my_cluster_2
            - label: kube_deployment_name
              operator: equals
              values:
                - my_deployment
          severity: high
          threshold: 75
          timeAggregation: avg
    

    Create MonitorAlertV2Metric Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new MonitorAlertV2Metric(name: string, args: MonitorAlertV2MetricArgs, opts?: CustomResourceOptions);
    @overload
    def MonitorAlertV2Metric(resource_name: str,
                             args: MonitorAlertV2MetricArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def MonitorAlertV2Metric(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             group_aggregation: Optional[str] = None,
                             time_aggregation: Optional[str] = None,
                             threshold: Optional[float] = None,
                             operator: Optional[str] = None,
                             metric: Optional[str] = None,
                             name: Optional[str] = None,
                             notification_channels: Optional[Sequence[MonitorAlertV2MetricNotificationChannelArgs]] = None,
                             group_bies: Optional[Sequence[str]] = None,
                             labels: Optional[Mapping[str, str]] = None,
                             links: Optional[Sequence[MonitorAlertV2MetricLinkArgs]] = None,
                             enabled: Optional[bool] = None,
                             monitor_alert_v2_metric_id: Optional[str] = None,
                             capture: Optional[MonitorAlertV2MetricCaptureArgs] = None,
                             no_data_behaviour: Optional[str] = None,
                             group: Optional[str] = None,
                             duration_seconds: Optional[float] = None,
                             range_seconds: Optional[float] = None,
                             scopes: Optional[Sequence[MonitorAlertV2MetricScopeArgs]] = None,
                             severity: Optional[str] = None,
                             description: Optional[str] = None,
                             custom_notification: Optional[MonitorAlertV2MetricCustomNotificationArgs] = None,
                             timeouts: Optional[MonitorAlertV2MetricTimeoutsArgs] = None,
                             unreported_alert_notifications_retention_seconds: Optional[float] = None,
                             warning_threshold: Optional[str] = None)
    func NewMonitorAlertV2Metric(ctx *Context, name string, args MonitorAlertV2MetricArgs, opts ...ResourceOption) (*MonitorAlertV2Metric, error)
    public MonitorAlertV2Metric(string name, MonitorAlertV2MetricArgs args, CustomResourceOptions? opts = null)
    public MonitorAlertV2Metric(String name, MonitorAlertV2MetricArgs args)
    public MonitorAlertV2Metric(String name, MonitorAlertV2MetricArgs args, CustomResourceOptions options)
    
    type: sysdig:MonitorAlertV2Metric
    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 MonitorAlertV2MetricArgs
    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 MonitorAlertV2MetricArgs
    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 MonitorAlertV2MetricArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MonitorAlertV2MetricArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MonitorAlertV2MetricArgs
    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 monitorAlertV2MetricResource = new Sysdig.MonitorAlertV2Metric("monitorAlertV2MetricResource", new()
    {
        GroupAggregation = "string",
        TimeAggregation = "string",
        Threshold = 0,
        Operator = "string",
        Metric = "string",
        Name = "string",
        NotificationChannels = new[]
        {
            new Sysdig.Inputs.MonitorAlertV2MetricNotificationChannelArgs
            {
                Id = 0,
                MainThreshold = false,
                NotifyOnResolve = false,
                RenotifyEveryMinutes = 0,
                WarningThreshold = false,
            },
        },
        GroupBies = new[]
        {
            "string",
        },
        Labels = 
        {
            { "string", "string" },
        },
        Links = new[]
        {
            new Sysdig.Inputs.MonitorAlertV2MetricLinkArgs
            {
                Type = "string",
                Href = "string",
                Id = "string",
            },
        },
        Enabled = false,
        MonitorAlertV2MetricId = "string",
        Capture = new Sysdig.Inputs.MonitorAlertV2MetricCaptureArgs
        {
            Filename = "string",
            DurationSeconds = 0,
            Enabled = false,
            Filter = "string",
            Storage = "string",
        },
        NoDataBehaviour = "string",
        Group = "string",
        DurationSeconds = 0,
        RangeSeconds = 0,
        Scopes = new[]
        {
            new Sysdig.Inputs.MonitorAlertV2MetricScopeArgs
            {
                Label = "string",
                Operator = "string",
                Values = new[]
                {
                    "string",
                },
            },
        },
        Severity = "string",
        Description = "string",
        CustomNotification = new Sysdig.Inputs.MonitorAlertV2MetricCustomNotificationArgs
        {
            AdditionalFields = new[]
            {
                new Sysdig.Inputs.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs
                {
                    Name = "string",
                    Value = "string",
                },
            },
            Append = "string",
            Prepend = "string",
            Subject = "string",
        },
        Timeouts = new Sysdig.Inputs.MonitorAlertV2MetricTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Read = "string",
            Update = "string",
        },
        UnreportedAlertNotificationsRetentionSeconds = 0,
        WarningThreshold = "string",
    });
    
    example, err := sysdig.NewMonitorAlertV2Metric(ctx, "monitorAlertV2MetricResource", &sysdig.MonitorAlertV2MetricArgs{
    	GroupAggregation: pulumi.String("string"),
    	TimeAggregation:  pulumi.String("string"),
    	Threshold:        pulumi.Float64(0),
    	Operator:         pulumi.String("string"),
    	Metric:           pulumi.String("string"),
    	Name:             pulumi.String("string"),
    	NotificationChannels: sysdig.MonitorAlertV2MetricNotificationChannelArray{
    		&sysdig.MonitorAlertV2MetricNotificationChannelArgs{
    			Id:                   pulumi.Float64(0),
    			MainThreshold:        pulumi.Bool(false),
    			NotifyOnResolve:      pulumi.Bool(false),
    			RenotifyEveryMinutes: pulumi.Float64(0),
    			WarningThreshold:     pulumi.Bool(false),
    		},
    	},
    	GroupBies: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Links: sysdig.MonitorAlertV2MetricLinkArray{
    		&sysdig.MonitorAlertV2MetricLinkArgs{
    			Type: pulumi.String("string"),
    			Href: pulumi.String("string"),
    			Id:   pulumi.String("string"),
    		},
    	},
    	Enabled:                pulumi.Bool(false),
    	MonitorAlertV2MetricId: pulumi.String("string"),
    	Capture: &sysdig.MonitorAlertV2MetricCaptureArgs{
    		Filename:        pulumi.String("string"),
    		DurationSeconds: pulumi.Float64(0),
    		Enabled:         pulumi.Bool(false),
    		Filter:          pulumi.String("string"),
    		Storage:         pulumi.String("string"),
    	},
    	NoDataBehaviour: pulumi.String("string"),
    	Group:           pulumi.String("string"),
    	DurationSeconds: pulumi.Float64(0),
    	RangeSeconds:    pulumi.Float64(0),
    	Scopes: sysdig.MonitorAlertV2MetricScopeArray{
    		&sysdig.MonitorAlertV2MetricScopeArgs{
    			Label:    pulumi.String("string"),
    			Operator: pulumi.String("string"),
    			Values: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    		},
    	},
    	Severity:    pulumi.String("string"),
    	Description: pulumi.String("string"),
    	CustomNotification: &sysdig.MonitorAlertV2MetricCustomNotificationArgs{
    		AdditionalFields: sysdig.MonitorAlertV2MetricCustomNotificationAdditionalFieldArray{
    			&sysdig.MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs{
    				Name:  pulumi.String("string"),
    				Value: pulumi.String("string"),
    			},
    		},
    		Append:  pulumi.String("string"),
    		Prepend: pulumi.String("string"),
    		Subject: pulumi.String("string"),
    	},
    	Timeouts: &sysdig.MonitorAlertV2MetricTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Read:   pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    	UnreportedAlertNotificationsRetentionSeconds: pulumi.Float64(0),
    	WarningThreshold: pulumi.String("string"),
    })
    
    var monitorAlertV2MetricResource = new MonitorAlertV2Metric("monitorAlertV2MetricResource", MonitorAlertV2MetricArgs.builder()
        .groupAggregation("string")
        .timeAggregation("string")
        .threshold(0.0)
        .operator("string")
        .metric("string")
        .name("string")
        .notificationChannels(MonitorAlertV2MetricNotificationChannelArgs.builder()
            .id(0.0)
            .mainThreshold(false)
            .notifyOnResolve(false)
            .renotifyEveryMinutes(0.0)
            .warningThreshold(false)
            .build())
        .groupBies("string")
        .labels(Map.of("string", "string"))
        .links(MonitorAlertV2MetricLinkArgs.builder()
            .type("string")
            .href("string")
            .id("string")
            .build())
        .enabled(false)
        .monitorAlertV2MetricId("string")
        .capture(MonitorAlertV2MetricCaptureArgs.builder()
            .filename("string")
            .durationSeconds(0.0)
            .enabled(false)
            .filter("string")
            .storage("string")
            .build())
        .noDataBehaviour("string")
        .group("string")
        .durationSeconds(0.0)
        .rangeSeconds(0.0)
        .scopes(MonitorAlertV2MetricScopeArgs.builder()
            .label("string")
            .operator("string")
            .values("string")
            .build())
        .severity("string")
        .description("string")
        .customNotification(MonitorAlertV2MetricCustomNotificationArgs.builder()
            .additionalFields(MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs.builder()
                .name("string")
                .value("string")
                .build())
            .append("string")
            .prepend("string")
            .subject("string")
            .build())
        .timeouts(MonitorAlertV2MetricTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .read("string")
            .update("string")
            .build())
        .unreportedAlertNotificationsRetentionSeconds(0.0)
        .warningThreshold("string")
        .build());
    
    monitor_alert_v2_metric_resource = sysdig.MonitorAlertV2Metric("monitorAlertV2MetricResource",
        group_aggregation="string",
        time_aggregation="string",
        threshold=0,
        operator="string",
        metric="string",
        name="string",
        notification_channels=[{
            "id": 0,
            "main_threshold": False,
            "notify_on_resolve": False,
            "renotify_every_minutes": 0,
            "warning_threshold": False,
        }],
        group_bies=["string"],
        labels={
            "string": "string",
        },
        links=[{
            "type": "string",
            "href": "string",
            "id": "string",
        }],
        enabled=False,
        monitor_alert_v2_metric_id="string",
        capture={
            "filename": "string",
            "duration_seconds": 0,
            "enabled": False,
            "filter": "string",
            "storage": "string",
        },
        no_data_behaviour="string",
        group="string",
        duration_seconds=0,
        range_seconds=0,
        scopes=[{
            "label": "string",
            "operator": "string",
            "values": ["string"],
        }],
        severity="string",
        description="string",
        custom_notification={
            "additional_fields": [{
                "name": "string",
                "value": "string",
            }],
            "append": "string",
            "prepend": "string",
            "subject": "string",
        },
        timeouts={
            "create": "string",
            "delete": "string",
            "read": "string",
            "update": "string",
        },
        unreported_alert_notifications_retention_seconds=0,
        warning_threshold="string")
    
    const monitorAlertV2MetricResource = new sysdig.MonitorAlertV2Metric("monitorAlertV2MetricResource", {
        groupAggregation: "string",
        timeAggregation: "string",
        threshold: 0,
        operator: "string",
        metric: "string",
        name: "string",
        notificationChannels: [{
            id: 0,
            mainThreshold: false,
            notifyOnResolve: false,
            renotifyEveryMinutes: 0,
            warningThreshold: false,
        }],
        groupBies: ["string"],
        labels: {
            string: "string",
        },
        links: [{
            type: "string",
            href: "string",
            id: "string",
        }],
        enabled: false,
        monitorAlertV2MetricId: "string",
        capture: {
            filename: "string",
            durationSeconds: 0,
            enabled: false,
            filter: "string",
            storage: "string",
        },
        noDataBehaviour: "string",
        group: "string",
        durationSeconds: 0,
        rangeSeconds: 0,
        scopes: [{
            label: "string",
            operator: "string",
            values: ["string"],
        }],
        severity: "string",
        description: "string",
        customNotification: {
            additionalFields: [{
                name: "string",
                value: "string",
            }],
            append: "string",
            prepend: "string",
            subject: "string",
        },
        timeouts: {
            create: "string",
            "delete": "string",
            read: "string",
            update: "string",
        },
        unreportedAlertNotificationsRetentionSeconds: 0,
        warningThreshold: "string",
    });
    
    type: sysdig:MonitorAlertV2Metric
    properties:
        capture:
            durationSeconds: 0
            enabled: false
            filename: string
            filter: string
            storage: string
        customNotification:
            additionalFields:
                - name: string
                  value: string
            append: string
            prepend: string
            subject: string
        description: string
        durationSeconds: 0
        enabled: false
        group: string
        groupAggregation: string
        groupBies:
            - string
        labels:
            string: string
        links:
            - href: string
              id: string
              type: string
        metric: string
        monitorAlertV2MetricId: string
        name: string
        noDataBehaviour: string
        notificationChannels:
            - id: 0
              mainThreshold: false
              notifyOnResolve: false
              renotifyEveryMinutes: 0
              warningThreshold: false
        operator: string
        rangeSeconds: 0
        scopes:
            - label: string
              operator: string
              values:
                - string
        severity: string
        threshold: 0
        timeAggregation: string
        timeouts:
            create: string
            delete: string
            read: string
            update: string
        unreportedAlertNotificationsRetentionSeconds: 0
        warningThreshold: string
    

    MonitorAlertV2Metric 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 MonitorAlertV2Metric resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the MonitorAlertV2Metric resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Team double
    Team ID that owns the alert.
    Version double
    Current version of the resource in Sysdig Monitor.
    Id string
    The provider-assigned unique ID for this managed resource.
    Team float64
    Team ID that owns the alert.
    Version float64
    Current version of the resource in Sysdig Monitor.
    id String
    The provider-assigned unique ID for this managed resource.
    team Double
    Team ID that owns the alert.
    version Double
    Current version of the resource in Sysdig Monitor.
    id string
    The provider-assigned unique ID for this managed resource.
    team number
    Team ID that owns the alert.
    version number
    Current version of the resource in Sysdig Monitor.
    id str
    The provider-assigned unique ID for this managed resource.
    team float
    Team ID that owns the alert.
    version float
    Current version of the resource in Sysdig Monitor.
    id String
    The provider-assigned unique ID for this managed resource.
    team Number
    Team ID that owns the alert.
    version Number
    Current version of the resource in Sysdig Monitor.

    Look up Existing MonitorAlertV2Metric Resource

    Get an existing MonitorAlertV2Metric 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?: MonitorAlertV2MetricState, opts?: CustomResourceOptions): MonitorAlertV2Metric
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            capture: Optional[MonitorAlertV2MetricCaptureArgs] = None,
            custom_notification: Optional[MonitorAlertV2MetricCustomNotificationArgs] = None,
            description: Optional[str] = None,
            duration_seconds: Optional[float] = None,
            enabled: Optional[bool] = None,
            group: Optional[str] = None,
            group_aggregation: Optional[str] = None,
            group_bies: Optional[Sequence[str]] = None,
            labels: Optional[Mapping[str, str]] = None,
            links: Optional[Sequence[MonitorAlertV2MetricLinkArgs]] = None,
            metric: Optional[str] = None,
            monitor_alert_v2_metric_id: Optional[str] = None,
            name: Optional[str] = None,
            no_data_behaviour: Optional[str] = None,
            notification_channels: Optional[Sequence[MonitorAlertV2MetricNotificationChannelArgs]] = None,
            operator: Optional[str] = None,
            range_seconds: Optional[float] = None,
            scopes: Optional[Sequence[MonitorAlertV2MetricScopeArgs]] = None,
            severity: Optional[str] = None,
            team: Optional[float] = None,
            threshold: Optional[float] = None,
            time_aggregation: Optional[str] = None,
            timeouts: Optional[MonitorAlertV2MetricTimeoutsArgs] = None,
            unreported_alert_notifications_retention_seconds: Optional[float] = None,
            version: Optional[float] = None,
            warning_threshold: Optional[str] = None) -> MonitorAlertV2Metric
    func GetMonitorAlertV2Metric(ctx *Context, name string, id IDInput, state *MonitorAlertV2MetricState, opts ...ResourceOption) (*MonitorAlertV2Metric, error)
    public static MonitorAlertV2Metric Get(string name, Input<string> id, MonitorAlertV2MetricState? state, CustomResourceOptions? opts = null)
    public static MonitorAlertV2Metric get(String name, Output<String> id, MonitorAlertV2MetricState state, CustomResourceOptions options)
    resources:  _:    type: sysdig:MonitorAlertV2Metric    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.
    The following state arguments are supported:

    Supporting Types

    MonitorAlertV2MetricCapture, MonitorAlertV2MetricCaptureArgs

    Filename string
    Defines the name of the capture file. Must have .scap suffix.
    DurationSeconds double
    Time frame of the capture. Default: 15.
    Enabled bool
    Wether to enable captures. Default: true.
    Filter string
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    Storage string
    Custom bucket where to save the capture.
    Filename string
    Defines the name of the capture file. Must have .scap suffix.
    DurationSeconds float64
    Time frame of the capture. Default: 15.
    Enabled bool
    Wether to enable captures. Default: true.
    Filter string
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    Storage string
    Custom bucket where to save the capture.
    filename String
    Defines the name of the capture file. Must have .scap suffix.
    durationSeconds Double
    Time frame of the capture. Default: 15.
    enabled Boolean
    Wether to enable captures. Default: true.
    filter String
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    storage String
    Custom bucket where to save the capture.
    filename string
    Defines the name of the capture file. Must have .scap suffix.
    durationSeconds number
    Time frame of the capture. Default: 15.
    enabled boolean
    Wether to enable captures. Default: true.
    filter string
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    storage string
    Custom bucket where to save the capture.
    filename str
    Defines the name of the capture file. Must have .scap suffix.
    duration_seconds float
    Time frame of the capture. Default: 15.
    enabled bool
    Wether to enable captures. Default: true.
    filter str
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    storage str
    Custom bucket where to save the capture.
    filename String
    Defines the name of the capture file. Must have .scap suffix.
    durationSeconds Number
    Time frame of the capture. Default: 15.
    enabled Boolean
    Wether to enable captures. Default: true.
    filter String
    Additional filter to apply to the capture. For example: proc.name contains nginx.
    storage String
    Custom bucket where to save the capture.

    MonitorAlertV2MetricCustomNotification, MonitorAlertV2MetricCustomNotificationArgs

    AdditionalFields List<MonitorAlertV2MetricCustomNotificationAdditionalField>
    Set of additional fields to add to the notification.
    Append string
    Text to add after the alert template.
    Prepend string
    Text to add before the alert template.
    Subject string
    Sets the title of the alert.
    AdditionalFields []MonitorAlertV2MetricCustomNotificationAdditionalField
    Set of additional fields to add to the notification.
    Append string
    Text to add after the alert template.
    Prepend string
    Text to add before the alert template.
    Subject string
    Sets the title of the alert.
    additionalFields List<MonitorAlertV2MetricCustomNotificationAdditionalField>
    Set of additional fields to add to the notification.
    append String
    Text to add after the alert template.
    prepend String
    Text to add before the alert template.
    subject String
    Sets the title of the alert.
    additionalFields MonitorAlertV2MetricCustomNotificationAdditionalField[]
    Set of additional fields to add to the notification.
    append string
    Text to add after the alert template.
    prepend string
    Text to add before the alert template.
    subject string
    Sets the title of the alert.
    additional_fields Sequence[MonitorAlertV2MetricCustomNotificationAdditionalField]
    Set of additional fields to add to the notification.
    append str
    Text to add after the alert template.
    prepend str
    Text to add before the alert template.
    subject str
    Sets the title of the alert.
    additionalFields List<Property Map>
    Set of additional fields to add to the notification.
    append String
    Text to add after the alert template.
    prepend String
    Text to add before the alert template.
    subject String
    Sets the title of the alert.

    MonitorAlertV2MetricCustomNotificationAdditionalField, MonitorAlertV2MetricCustomNotificationAdditionalFieldArgs

    Name string
    field name.
    Value string
    field value.
    Name string
    field name.
    Value string
    field value.
    name String
    field name.
    value String
    field value.
    name string
    field name.
    value string
    field value.
    name str
    field name.
    value str
    field value.
    name String
    field name.
    value String
    field value.
    Type string
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    Href string
    When using runbook type, url of the external resource.
    Id string
    When using dashboard type, dashboard id.
    Type string
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    Href string
    When using runbook type, url of the external resource.
    Id string
    When using dashboard type, dashboard id.
    type String
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    href String
    When using runbook type, url of the external resource.
    id String
    When using dashboard type, dashboard id.
    type string
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    href string
    When using runbook type, url of the external resource.
    id string
    When using dashboard type, dashboard id.
    type str
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    href str
    When using runbook type, url of the external resource.
    id str
    When using dashboard type, dashboard id.
    type String
    Type of link. Must be runbook, for generic links, or dashboard, for internal links to existing dashboards.
    href String
    When using runbook type, url of the external resource.
    id String
    When using dashboard type, dashboard id.

    MonitorAlertV2MetricNotificationChannel, MonitorAlertV2MetricNotificationChannelArgs

    Id double
    The ID of the notification channel.
    MainThreshold bool
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    NotifyOnResolve bool
    Wether to send a notification when the alert is resolved. Default: true.
    RenotifyEveryMinutes double
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    WarningThreshold bool
    Whether this notification channel is used for the warning threshold of the alert. Default: false.
    Id float64
    The ID of the notification channel.
    MainThreshold bool
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    NotifyOnResolve bool
    Wether to send a notification when the alert is resolved. Default: true.
    RenotifyEveryMinutes float64
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    WarningThreshold bool
    Whether this notification channel is used for the warning threshold of the alert. Default: false.
    id Double
    The ID of the notification channel.
    mainThreshold Boolean
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    notifyOnResolve Boolean
    Wether to send a notification when the alert is resolved. Default: true.
    renotifyEveryMinutes Double
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    warningThreshold Boolean
    Whether this notification channel is used for the warning threshold of the alert. Default: false.
    id number
    The ID of the notification channel.
    mainThreshold boolean
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    notifyOnResolve boolean
    Wether to send a notification when the alert is resolved. Default: true.
    renotifyEveryMinutes number
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    warningThreshold boolean
    Whether this notification channel is used for the warning threshold of the alert. Default: false.
    id float
    The ID of the notification channel.
    main_threshold bool
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    notify_on_resolve bool
    Wether to send a notification when the alert is resolved. Default: true.
    renotify_every_minutes float
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    warning_threshold bool
    Whether this notification channel is used for the warning threshold of the alert. Default: false.
    id Number
    The ID of the notification channel.
    mainThreshold Boolean
    Whether this notification channel is used for the main threshold of the alert. Default: true.
    notifyOnResolve Boolean
    Wether to send a notification when the alert is resolved. Default: true.
    renotifyEveryMinutes Number
    the amount of minutes to wait before re sending the notification to this channel. 0 means no renotification enabled. Default: 0.
    warningThreshold Boolean
    Whether this notification channel is used for the warning threshold of the alert. Default: false.

    MonitorAlertV2MetricScope, MonitorAlertV2MetricScopeArgs

    Label string
    Label in prometheus notation to select a part of the infrastructure.
    Operator string
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    Values List<string>
    List of values to match the scope.
    Label string
    Label in prometheus notation to select a part of the infrastructure.
    Operator string
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    Values []string
    List of values to match the scope.
    label String
    Label in prometheus notation to select a part of the infrastructure.
    operator String
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    values List<String>
    List of values to match the scope.
    label string
    Label in prometheus notation to select a part of the infrastructure.
    operator string
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    values string[]
    List of values to match the scope.
    label str
    Label in prometheus notation to select a part of the infrastructure.
    operator str
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    values Sequence[str]
    List of values to match the scope.
    label String
    Label in prometheus notation to select a part of the infrastructure.
    operator String
    Operator to match the label. It can be equals, notEquals, in, notIn, contains, notContains, startsWith.
    values List<String>
    List of values to match the scope.

    MonitorAlertV2MetricTimeouts, MonitorAlertV2MetricTimeoutsArgs

    Create string
    Delete string
    Read string
    Update string
    Create string
    Delete string
    Read string
    Update string
    create String
    delete String
    read String
    update String
    create string
    delete string
    read string
    update string
    create str
    delete str
    read str
    update str
    create String
    delete String
    read String
    update String

    Import

    Metric Threshold alerts can be imported using the alert ID, e.g.

    $ pulumi import sysdig:index/monitorAlertV2Metric:MonitorAlertV2Metric example 12345
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    sysdig sysdiglabs/terraform-provider-sysdig
    License
    Notes
    This Pulumi package is based on the sysdig Terraform Provider.
    sysdig logo
    sysdig 2.1.0 published on Tuesday, Oct 7, 2025 by sysdiglabs
      Meet Neo: Your AI Platform Teammate