1. Packages
  2. Logdna Provider
  3. API Docs
  4. Alert
logdna 1.16.0 published on Monday, Apr 14, 2025 by logdna

logdna.Alert

Explore with Pulumi AI

logdna logo
logdna 1.16.0 published on Monday, Apr 14, 2025 by logdna

    # Resource: logdna.Alert

    Manages LogDNA Preset Alerts. Preset Alerts are alerts that you can define separately from a specific View. Preset Alerts can be created standalone and then attached (or detached) to any View, as opposed to View-specific Alerts, which are created specifically for a certain View.

    To get started, all you need to do is to specify a name and configuration for one of our currently supported alerts: email, webhook, or PagerDuty.

    Example - Basic Preset Alert

    import * as pulumi from "@pulumi/pulumi";
    import * as logdna from "@pulumi/logdna";
    
    const myAlert = new logdna.Alert("myAlert", {emailChannels: [{
        emails: ["test@logdna.com"],
        immediate: "false",
        operator: "presence",
        terminal: "true",
        timezone: "Pacific/Samoa",
        triggerinterval: "15m",
        triggerlimit: 15,
    }]});
    
    import pulumi
    import pulumi_logdna as logdna
    
    my_alert = logdna.Alert("myAlert", email_channels=[{
        "emails": ["test@logdna.com"],
        "immediate": "false",
        "operator": "presence",
        "terminal": "true",
        "timezone": "Pacific/Samoa",
        "triggerinterval": "15m",
        "triggerlimit": 15,
    }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logdna/logdna"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logdna.NewAlert(ctx, "myAlert", &logdna.AlertArgs{
    			EmailChannels: logdna.AlertEmailChannelArray{
    				&logdna.AlertEmailChannelArgs{
    					Emails: pulumi.StringArray{
    						pulumi.String("test@logdna.com"),
    					},
    					Immediate:       pulumi.String("false"),
    					Operator:        pulumi.String("presence"),
    					Terminal:        pulumi.String("true"),
    					Timezone:        pulumi.String("Pacific/Samoa"),
    					Triggerinterval: pulumi.String("15m"),
    					Triggerlimit:    pulumi.Float64(15),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logdna = Pulumi.Logdna;
    
    return await Deployment.RunAsync(() => 
    {
        var myAlert = new Logdna.Alert("myAlert", new()
        {
            EmailChannels = new[]
            {
                new Logdna.Inputs.AlertEmailChannelArgs
                {
                    Emails = new[]
                    {
                        "test@logdna.com",
                    },
                    Immediate = "false",
                    Operator = "presence",
                    Terminal = "true",
                    Timezone = "Pacific/Samoa",
                    Triggerinterval = "15m",
                    Triggerlimit = 15,
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logdna.Alert;
    import com.pulumi.logdna.AlertArgs;
    import com.pulumi.logdna.inputs.AlertEmailChannelArgs;
    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 myAlert = new Alert("myAlert", AlertArgs.builder()
                .emailChannels(AlertEmailChannelArgs.builder()
                    .emails("test@logdna.com")
                    .immediate("false")
                    .operator("presence")
                    .terminal("true")
                    .timezone("Pacific/Samoa")
                    .triggerinterval("15m")
                    .triggerlimit(15)
                    .build())
                .build());
    
        }
    }
    
    resources:
      myAlert:
        type: logdna:Alert
        properties:
          emailChannels:
            - emails:
                - test@logdna.com
              immediate: 'false'
              operator: presence
              terminal: 'true'
              timezone: Pacific/Samoa
              triggerinterval: 15m
              triggerlimit: 15
    

    Example - Multi-channel Preset Alert

    import * as pulumi from "@pulumi/pulumi";
    import * as logdna from "@pulumi/logdna";
    
    const myAlert = new logdna.Alert("myAlert", {
        emailChannels: [{
            emails: ["test@logdna.com"],
            immediate: "false",
            operator: "absence",
            terminal: "true",
            timezone: "Pacific/Samoa",
            triggerinterval: "15m",
            triggerlimit: 15,
        }],
        pagerdutyChannels: [{
            immediate: "true",
            key: "Your PagerDuty API key goes here",
            terminal: "true",
            triggerinterval: "15m",
            triggerlimit: 15,
            autoresolve: true,
            autoresolvelimit: 10,
            autoresolveinterval: "15m",
        }],
        slackChannels: [{
            immediate: "false",
            operator: "absence",
            terminal: "true",
            triggerinterval: "15m",
            triggerlimit: 15,
            url: "https://hooks.slack.com/services/identifier/secret",
        }],
        webhookChannels: [{
            bodytemplate: JSON.stringify({
                message: "Alerts from {{name}}",
            }),
            headers: {
                Authentication: "auth_header_value",
                HeaderTwo: "ValueTwo",
            },
            immediate: "false",
            method: "post",
            terminal: "true",
            triggerinterval: "15m",
            triggerlimit: 15,
            url: "https://yourwebhook/endpoint",
        }],
    });
    
    import pulumi
    import json
    import pulumi_logdna as logdna
    
    my_alert = logdna.Alert("myAlert",
        email_channels=[{
            "emails": ["test@logdna.com"],
            "immediate": "false",
            "operator": "absence",
            "terminal": "true",
            "timezone": "Pacific/Samoa",
            "triggerinterval": "15m",
            "triggerlimit": 15,
        }],
        pagerduty_channels=[{
            "immediate": "true",
            "key": "Your PagerDuty API key goes here",
            "terminal": "true",
            "triggerinterval": "15m",
            "triggerlimit": 15,
            "autoresolve": True,
            "autoresolvelimit": 10,
            "autoresolveinterval": "15m",
        }],
        slack_channels=[{
            "immediate": "false",
            "operator": "absence",
            "terminal": "true",
            "triggerinterval": "15m",
            "triggerlimit": 15,
            "url": "https://hooks.slack.com/services/identifier/secret",
        }],
        webhook_channels=[{
            "bodytemplate": json.dumps({
                "message": "Alerts from {{name}}",
            }),
            "headers": {
                "Authentication": "auth_header_value",
                "HeaderTwo": "ValueTwo",
            },
            "immediate": "false",
            "method": "post",
            "terminal": "true",
            "triggerinterval": "15m",
            "triggerlimit": 15,
            "url": "https://yourwebhook/endpoint",
        }])
    
    package main
    
    import (
    	"encoding/json"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logdna/logdna"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		tmpJSON0, err := json.Marshal(map[string]interface{}{
    			"message": "Alerts from {{name}}",
    		})
    		if err != nil {
    			return err
    		}
    		json0 := string(tmpJSON0)
    		_, err = logdna.NewAlert(ctx, "myAlert", &logdna.AlertArgs{
    			EmailChannels: logdna.AlertEmailChannelArray{
    				&logdna.AlertEmailChannelArgs{
    					Emails: pulumi.StringArray{
    						pulumi.String("test@logdna.com"),
    					},
    					Immediate:       pulumi.String("false"),
    					Operator:        pulumi.String("absence"),
    					Terminal:        pulumi.String("true"),
    					Timezone:        pulumi.String("Pacific/Samoa"),
    					Triggerinterval: pulumi.String("15m"),
    					Triggerlimit:    pulumi.Float64(15),
    				},
    			},
    			PagerdutyChannels: logdna.AlertPagerdutyChannelArray{
    				&logdna.AlertPagerdutyChannelArgs{
    					Immediate:           pulumi.String("true"),
    					Key:                 pulumi.String("Your PagerDuty API key goes here"),
    					Terminal:            pulumi.String("true"),
    					Triggerinterval:     pulumi.String("15m"),
    					Triggerlimit:        pulumi.Float64(15),
    					Autoresolve:         pulumi.Bool(true),
    					Autoresolvelimit:    pulumi.Float64(10),
    					Autoresolveinterval: pulumi.String("15m"),
    				},
    			},
    			SlackChannels: logdna.AlertSlackChannelArray{
    				&logdna.AlertSlackChannelArgs{
    					Immediate:       pulumi.String("false"),
    					Operator:        pulumi.String("absence"),
    					Terminal:        pulumi.String("true"),
    					Triggerinterval: pulumi.String("15m"),
    					Triggerlimit:    pulumi.Float64(15),
    					Url:             pulumi.String("https://hooks.slack.com/services/identifier/secret"),
    				},
    			},
    			WebhookChannels: logdna.AlertWebhookChannelArray{
    				&logdna.AlertWebhookChannelArgs{
    					Bodytemplate: pulumi.String(json0),
    					Headers: pulumi.StringMap{
    						"Authentication": pulumi.String("auth_header_value"),
    						"HeaderTwo":      pulumi.String("ValueTwo"),
    					},
    					Immediate:       pulumi.String("false"),
    					Method:          pulumi.String("post"),
    					Terminal:        pulumi.String("true"),
    					Triggerinterval: pulumi.String("15m"),
    					Triggerlimit:    pulumi.Float64(15),
    					Url:             pulumi.String("https://yourwebhook/endpoint"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using System.Text.Json;
    using Pulumi;
    using Logdna = Pulumi.Logdna;
    
    return await Deployment.RunAsync(() => 
    {
        var myAlert = new Logdna.Alert("myAlert", new()
        {
            EmailChannels = new[]
            {
                new Logdna.Inputs.AlertEmailChannelArgs
                {
                    Emails = new[]
                    {
                        "test@logdna.com",
                    },
                    Immediate = "false",
                    Operator = "absence",
                    Terminal = "true",
                    Timezone = "Pacific/Samoa",
                    Triggerinterval = "15m",
                    Triggerlimit = 15,
                },
            },
            PagerdutyChannels = new[]
            {
                new Logdna.Inputs.AlertPagerdutyChannelArgs
                {
                    Immediate = "true",
                    Key = "Your PagerDuty API key goes here",
                    Terminal = "true",
                    Triggerinterval = "15m",
                    Triggerlimit = 15,
                    Autoresolve = true,
                    Autoresolvelimit = 10,
                    Autoresolveinterval = "15m",
                },
            },
            SlackChannels = new[]
            {
                new Logdna.Inputs.AlertSlackChannelArgs
                {
                    Immediate = "false",
                    Operator = "absence",
                    Terminal = "true",
                    Triggerinterval = "15m",
                    Triggerlimit = 15,
                    Url = "https://hooks.slack.com/services/identifier/secret",
                },
            },
            WebhookChannels = new[]
            {
                new Logdna.Inputs.AlertWebhookChannelArgs
                {
                    Bodytemplate = JsonSerializer.Serialize(new Dictionary<string, object?>
                    {
                        ["message"] = "Alerts from {{name}}",
                    }),
                    Headers = 
                    {
                        { "Authentication", "auth_header_value" },
                        { "HeaderTwo", "ValueTwo" },
                    },
                    Immediate = "false",
                    Method = "post",
                    Terminal = "true",
                    Triggerinterval = "15m",
                    Triggerlimit = 15,
                    Url = "https://yourwebhook/endpoint",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logdna.Alert;
    import com.pulumi.logdna.AlertArgs;
    import com.pulumi.logdna.inputs.AlertEmailChannelArgs;
    import com.pulumi.logdna.inputs.AlertPagerdutyChannelArgs;
    import com.pulumi.logdna.inputs.AlertSlackChannelArgs;
    import com.pulumi.logdna.inputs.AlertWebhookChannelArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    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 myAlert = new Alert("myAlert", AlertArgs.builder()
                .emailChannels(AlertEmailChannelArgs.builder()
                    .emails("test@logdna.com")
                    .immediate("false")
                    .operator("absence")
                    .terminal("true")
                    .timezone("Pacific/Samoa")
                    .triggerinterval("15m")
                    .triggerlimit(15)
                    .build())
                .pagerdutyChannels(AlertPagerdutyChannelArgs.builder()
                    .immediate("true")
                    .key("Your PagerDuty API key goes here")
                    .terminal("true")
                    .triggerinterval("15m")
                    .triggerlimit(15)
                    .autoresolve(true)
                    .autoresolvelimit(10)
                    .autoresolveinterval("15m")
                    .build())
                .slackChannels(AlertSlackChannelArgs.builder()
                    .immediate("false")
                    .operator("absence")
                    .terminal("true")
                    .triggerinterval("15m")
                    .triggerlimit(15)
                    .url("https://hooks.slack.com/services/identifier/secret")
                    .build())
                .webhookChannels(AlertWebhookChannelArgs.builder()
                    .bodytemplate(serializeJson(
                        jsonObject(
                            jsonProperty("message", "Alerts from {{name}}")
                        )))
                    .headers(Map.ofEntries(
                        Map.entry("Authentication", "auth_header_value"),
                        Map.entry("HeaderTwo", "ValueTwo")
                    ))
                    .immediate("false")
                    .method("post")
                    .terminal("true")
                    .triggerinterval("15m")
                    .triggerlimit(15)
                    .url("https://yourwebhook/endpoint")
                    .build())
                .build());
    
        }
    }
    
    resources:
      myAlert:
        type: logdna:Alert
        properties:
          emailChannels:
            - emails:
                - test@logdna.com
              immediate: 'false'
              operator: absence
              terminal: 'true'
              timezone: Pacific/Samoa
              triggerinterval: 15m
              triggerlimit: 15
          pagerdutyChannels:
            - immediate: 'true'
              key: Your PagerDuty API key goes here
              terminal: 'true'
              triggerinterval: 15m
              triggerlimit: 15
              autoresolve: true
              autoresolvelimit: 10
              autoresolveinterval: 15m
          slackChannels:
            - immediate: 'false'
              operator: absence
              terminal: 'true'
              triggerinterval: 15m
              triggerlimit: 15
              url: https://hooks.slack.com/services/identifier/secret
          webhookChannels:
            - bodytemplate:
                fn::toJSON:
                  message: Alerts from {{name}}
              headers:
                Authentication: auth_header_value
                HeaderTwo: ValueTwo
              immediate: 'false'
              method: post
              terminal: 'true'
              triggerinterval: 15m
              triggerlimit: 15
              url: https://yourwebhook/endpoint
    

    Create Alert Resource

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

    Constructor syntax

    new Alert(name: string, args?: AlertArgs, opts?: CustomResourceOptions);
    @overload
    def Alert(resource_name: str,
              args: Optional[AlertArgs] = None,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alert(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              alert_id: Optional[str] = None,
              email_channels: Optional[Sequence[AlertEmailChannelArgs]] = None,
              name: Optional[str] = None,
              pagerduty_channels: Optional[Sequence[AlertPagerdutyChannelArgs]] = None,
              slack_channels: Optional[Sequence[AlertSlackChannelArgs]] = None,
              webhook_channels: Optional[Sequence[AlertWebhookChannelArgs]] = None)
    func NewAlert(ctx *Context, name string, args *AlertArgs, opts ...ResourceOption) (*Alert, error)
    public Alert(string name, AlertArgs? args = null, CustomResourceOptions? opts = null)
    public Alert(String name, AlertArgs args)
    public Alert(String name, AlertArgs args, CustomResourceOptions options)
    
    type: logdna:Alert
    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 AlertArgs
    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 AlertArgs
    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 AlertArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AlertArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AlertArgs
    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 alertResource = new Logdna.Alert("alertResource", new()
    {
        AlertId = "string",
        EmailChannels = new[]
        {
            new Logdna.Inputs.AlertEmailChannelArgs
            {
                Emails = new[]
                {
                    "string",
                },
                Terminal = "string",
                Triggerlimit = 0,
                Immediate = "string",
                Operator = "string",
                Timezone = "string",
                Triggerinterval = "string",
            },
        },
        Name = "string",
        PagerdutyChannels = new[]
        {
            new Logdna.Inputs.AlertPagerdutyChannelArgs
            {
                Key = "string",
                Triggerlimit = 0,
                Autoresolve = false,
                Autoresolveinterval = "string",
                Autoresolvelimit = 0,
                Immediate = "string",
                Operator = "string",
                Terminal = "string",
                Triggerinterval = "string",
            },
        },
        SlackChannels = new[]
        {
            new Logdna.Inputs.AlertSlackChannelArgs
            {
                Triggerlimit = 0,
                Url = "string",
                Immediate = "string",
                Operator = "string",
                Terminal = "string",
                Triggerinterval = "string",
            },
        },
        WebhookChannels = new[]
        {
            new Logdna.Inputs.AlertWebhookChannelArgs
            {
                Triggerinterval = "string",
                Triggerlimit = 0,
                Url = "string",
                Bodytemplate = "string",
                Headers = 
                {
                    { "string", "string" },
                },
                Immediate = "string",
                Method = "string",
                Operator = "string",
                Terminal = "string",
            },
        },
    });
    
    example, err := logdna.NewAlert(ctx, "alertResource", &logdna.AlertArgs{
    	AlertId: pulumi.String("string"),
    	EmailChannels: logdna.AlertEmailChannelArray{
    		&logdna.AlertEmailChannelArgs{
    			Emails: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Terminal:        pulumi.String("string"),
    			Triggerlimit:    pulumi.Float64(0),
    			Immediate:       pulumi.String("string"),
    			Operator:        pulumi.String("string"),
    			Timezone:        pulumi.String("string"),
    			Triggerinterval: pulumi.String("string"),
    		},
    	},
    	Name: pulumi.String("string"),
    	PagerdutyChannels: logdna.AlertPagerdutyChannelArray{
    		&logdna.AlertPagerdutyChannelArgs{
    			Key:                 pulumi.String("string"),
    			Triggerlimit:        pulumi.Float64(0),
    			Autoresolve:         pulumi.Bool(false),
    			Autoresolveinterval: pulumi.String("string"),
    			Autoresolvelimit:    pulumi.Float64(0),
    			Immediate:           pulumi.String("string"),
    			Operator:            pulumi.String("string"),
    			Terminal:            pulumi.String("string"),
    			Triggerinterval:     pulumi.String("string"),
    		},
    	},
    	SlackChannels: logdna.AlertSlackChannelArray{
    		&logdna.AlertSlackChannelArgs{
    			Triggerlimit:    pulumi.Float64(0),
    			Url:             pulumi.String("string"),
    			Immediate:       pulumi.String("string"),
    			Operator:        pulumi.String("string"),
    			Terminal:        pulumi.String("string"),
    			Triggerinterval: pulumi.String("string"),
    		},
    	},
    	WebhookChannels: logdna.AlertWebhookChannelArray{
    		&logdna.AlertWebhookChannelArgs{
    			Triggerinterval: pulumi.String("string"),
    			Triggerlimit:    pulumi.Float64(0),
    			Url:             pulumi.String("string"),
    			Bodytemplate:    pulumi.String("string"),
    			Headers: pulumi.StringMap{
    				"string": pulumi.String("string"),
    			},
    			Immediate: pulumi.String("string"),
    			Method:    pulumi.String("string"),
    			Operator:  pulumi.String("string"),
    			Terminal:  pulumi.String("string"),
    		},
    	},
    })
    
    var alertResource = new Alert("alertResource", AlertArgs.builder()
        .alertId("string")
        .emailChannels(AlertEmailChannelArgs.builder()
            .emails("string")
            .terminal("string")
            .triggerlimit(0)
            .immediate("string")
            .operator("string")
            .timezone("string")
            .triggerinterval("string")
            .build())
        .name("string")
        .pagerdutyChannels(AlertPagerdutyChannelArgs.builder()
            .key("string")
            .triggerlimit(0)
            .autoresolve(false)
            .autoresolveinterval("string")
            .autoresolvelimit(0)
            .immediate("string")
            .operator("string")
            .terminal("string")
            .triggerinterval("string")
            .build())
        .slackChannels(AlertSlackChannelArgs.builder()
            .triggerlimit(0)
            .url("string")
            .immediate("string")
            .operator("string")
            .terminal("string")
            .triggerinterval("string")
            .build())
        .webhookChannels(AlertWebhookChannelArgs.builder()
            .triggerinterval("string")
            .triggerlimit(0)
            .url("string")
            .bodytemplate("string")
            .headers(Map.of("string", "string"))
            .immediate("string")
            .method("string")
            .operator("string")
            .terminal("string")
            .build())
        .build());
    
    alert_resource = logdna.Alert("alertResource",
        alert_id="string",
        email_channels=[{
            "emails": ["string"],
            "terminal": "string",
            "triggerlimit": 0,
            "immediate": "string",
            "operator": "string",
            "timezone": "string",
            "triggerinterval": "string",
        }],
        name="string",
        pagerduty_channels=[{
            "key": "string",
            "triggerlimit": 0,
            "autoresolve": False,
            "autoresolveinterval": "string",
            "autoresolvelimit": 0,
            "immediate": "string",
            "operator": "string",
            "terminal": "string",
            "triggerinterval": "string",
        }],
        slack_channels=[{
            "triggerlimit": 0,
            "url": "string",
            "immediate": "string",
            "operator": "string",
            "terminal": "string",
            "triggerinterval": "string",
        }],
        webhook_channels=[{
            "triggerinterval": "string",
            "triggerlimit": 0,
            "url": "string",
            "bodytemplate": "string",
            "headers": {
                "string": "string",
            },
            "immediate": "string",
            "method": "string",
            "operator": "string",
            "terminal": "string",
        }])
    
    const alertResource = new logdna.Alert("alertResource", {
        alertId: "string",
        emailChannels: [{
            emails: ["string"],
            terminal: "string",
            triggerlimit: 0,
            immediate: "string",
            operator: "string",
            timezone: "string",
            triggerinterval: "string",
        }],
        name: "string",
        pagerdutyChannels: [{
            key: "string",
            triggerlimit: 0,
            autoresolve: false,
            autoresolveinterval: "string",
            autoresolvelimit: 0,
            immediate: "string",
            operator: "string",
            terminal: "string",
            triggerinterval: "string",
        }],
        slackChannels: [{
            triggerlimit: 0,
            url: "string",
            immediate: "string",
            operator: "string",
            terminal: "string",
            triggerinterval: "string",
        }],
        webhookChannels: [{
            triggerinterval: "string",
            triggerlimit: 0,
            url: "string",
            bodytemplate: "string",
            headers: {
                string: "string",
            },
            immediate: "string",
            method: "string",
            operator: "string",
            terminal: "string",
        }],
    });
    
    type: logdna:Alert
    properties:
        alertId: string
        emailChannels:
            - emails:
                - string
              immediate: string
              operator: string
              terminal: string
              timezone: string
              triggerinterval: string
              triggerlimit: 0
        name: string
        pagerdutyChannels:
            - autoresolve: false
              autoresolveinterval: string
              autoresolvelimit: 0
              immediate: string
              key: string
              operator: string
              terminal: string
              triggerinterval: string
              triggerlimit: 0
        slackChannels:
            - immediate: string
              operator: string
              terminal: string
              triggerinterval: string
              triggerlimit: 0
              url: string
        webhookChannels:
            - bodytemplate: string
              headers:
                string: string
              immediate: string
              method: string
              operator: string
              terminal: string
              triggerinterval: string
              triggerlimit: 0
              url: string
    

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

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Alert Resource

    Get an existing Alert 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?: AlertState, opts?: CustomResourceOptions): Alert
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            alert_id: Optional[str] = None,
            email_channels: Optional[Sequence[AlertEmailChannelArgs]] = None,
            name: Optional[str] = None,
            pagerduty_channels: Optional[Sequence[AlertPagerdutyChannelArgs]] = None,
            slack_channels: Optional[Sequence[AlertSlackChannelArgs]] = None,
            webhook_channels: Optional[Sequence[AlertWebhookChannelArgs]] = None) -> Alert
    func GetAlert(ctx *Context, name string, id IDInput, state *AlertState, opts ...ResourceOption) (*Alert, error)
    public static Alert Get(string name, Input<string> id, AlertState? state, CustomResourceOptions? opts = null)
    public static Alert get(String name, Output<String> id, AlertState state, CustomResourceOptions options)
    resources:  _:    type: logdna:Alert    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

    AlertEmailChannel, AlertEmailChannelArgs

    Emails List<string>
    []string (Required) An array of email addresses (strings) to notify in the Alert
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerlimit double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Immediate string
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Timezone string
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Emails []string
    []string (Required) An array of email addresses (strings) to notify in the Alert
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerlimit float64
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Immediate string
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Timezone string
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    emails List<String>
    []string (Required) An array of email addresses (strings) to notify in the Alert
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerlimit Double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    immediate String
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    timezone String
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    emails string[]
    []string (Required) An array of email addresses (strings) to notify in the Alert
    terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerlimit number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    immediate string
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    timezone string
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    emails Sequence[str]
    []string (Required) An array of email addresses (strings) to notify in the Alert
    terminal str
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerlimit float
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    immediate str
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator str
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    timezone str
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    triggerinterval str
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    emails List<String>
    []string (Required) An array of email addresses (strings) to notify in the Alert
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g. send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerlimit Number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    immediate String
    string (Optional; Default: "false") Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    timezone String
    string (Optional) Which time zone the log timestamps will be formatted in. Timezones are represented as database time zones.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.

    AlertPagerdutyChannel, AlertPagerdutyChannelArgs

    Key string
    string (Required) The PagerDuty service key.
    Triggerlimit double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Autoresolve bool
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    Autoresolveinterval string
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Autoresolvelimit double
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Key string
    string (Required) The PagerDuty service key.
    Triggerlimit float64
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Autoresolve bool
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    Autoresolveinterval string
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Autoresolvelimit float64
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    key String
    string (Required) The PagerDuty service key.
    triggerlimit Double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    autoresolve Boolean
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    autoresolveinterval String
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    autoresolvelimit Double
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    key string
    string (Required) The PagerDuty service key.
    triggerlimit number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    autoresolve boolean
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    autoresolveinterval string
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    autoresolvelimit number
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    key str
    string (Required) The PagerDuty service key.
    triggerlimit float
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    autoresolve bool
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    autoresolveinterval str
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    autoresolvelimit float
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    immediate str
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator str
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal str
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval str
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    key String
    string (Required) The PagerDuty service key.
    triggerlimit Number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    autoresolve Boolean
    boolean Set to true if you want the set a condition to resolve the incident that was raised by this alert.
    autoresolveinterval String
    string (Required if autoresolve is set to true) Interval of time to aggregate and check # of matched lines against the auto resolve limit. For absence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For presence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    autoresolvelimit Number
    integer (Required if autoresolve is set to true) Specify the number of log lines that match the view's filtering and search criteria. When the number of log lines is reached, this incident will be set to resolved in PagerDuty.
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.

    AlertSlackChannel, AlertSlackChannelArgs

    Triggerlimit double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Url string
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Triggerlimit float64
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Url string
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit Double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url String
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url string
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit float
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url str
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    immediate str
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator str
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal str
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval str
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit Number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url String
    string (Required) The URL of the webhook for a given Slack application/integration (& channel).
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.

    AlertWebhookChannel, AlertWebhookChannelArgs

    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Triggerlimit double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Url string
    string (Required) The URL of the webhook.
    Bodytemplate string
    Headers Dictionary<string, string>
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Method string
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    Triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    Triggerlimit float64
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    Url string
    string (Required) The URL of the webhook.
    Bodytemplate string
    Headers map[string]string
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    Immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    Method string
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    Operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    Terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit Double
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url String
    string (Required) The URL of the webhook.
    bodytemplate String
    headers Map<String,String>
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    method String
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval string
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url string
    string (Required) The URL of the webhook.
    bodytemplate string
    headers {[key: string]: string}
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    immediate string
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    method string
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    operator string
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal string
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval str
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit float
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url str
    string (Required) The URL of the webhook.
    bodytemplate str
    headers Mapping[str, str]
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    immediate str
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    method str
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    operator str
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal str
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.
    triggerinterval String
    string (Optional; Defaults: "30" for presence; "15m" for absence) Interval which the Alert will be looking for presence or absence of log lines. For presence Alerts, valid options are: 30, 1m, 5m, 15m, 30m, 1h, 6h, 12h, and 24h. For absence Alerts, valid options are: 15m, 30m, 1h, 6h, 12h, and 24h.
    triggerlimit Number
    integer (Required) Number of lines before the Alert is triggered (e.g. setting a value of 10 for an absence Alert would alert you if 10 lines were not seen in the triggerinterval).
    url String
    string (Required) The URL of the webhook.
    bodytemplate String
    headers Map<String>
    _map<string, string> (Optional) Key-value pair for webhook request headers and header values. Example: "MyHeader" = "MyValue"
    immediate String
    string (Optional; Default: "false") Whether the Alert will trigger immediately after the trigger limit is reached. Valid options are "true" and "false" for presence Alerts and "false" for absence Alerts.
    method String
    string (Optional; Default: post) Method used for the webhook request. Valid options are: post, put, patch, get, delete.
    operator String
    string (Optional; Default: presence) Whether the Alert will trigger on the presence or absence of logs. Valid options are presence and absence.
    terminal String
    string (Optional; Default: "true") Whether the Alert will trigger after the triggerinterval if the Alert condition is met (e.g., send an Alert after 30s). Valid options are "true" and "false" for presence Alerts and "true" for absence Alerts.

    Import

    Preset Alerts can be imported by presetid, which can be found using the List Preset Alerts API:

    1. Custom HTTP Headers - servicekey: <SERVICE_KEY> or apikey: <SERVICE_KEY>

    curl –request GET \

     --url <API_URL>/v1/config/presetalert \
    
     --header 'Accept: application/json' \
    
     --header 'servicekey: <SERVICE_KEY>'
    
    1. Basic Auth - Authorization: Basic <encodeInBase64(credentials)>.

    Credentials is a string composed of formatted as <username>:<password>, our usage here entails substituting <SERVICE_KEY> as the username and leaving the password blank. The colon separator should still included in the resulting string <SERVICE_KEY>:

    curl –request GET \

     --url <API_URL>/v1/config/presetalert \
    
     --header 'Accept: application/json' \
    
     --header 'Authorization: Basic <BASE_64_ENCODED_CREDENTIALS>'
    
    $ pulumi import logdna:index/alert:Alert your-alert-name <presetid>
    

    Note that only the alert channels supported by this provider will be imported.

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

    Package Details

    Repository
    logdna logdna/terraform-provider-logdna
    License
    Notes
    This Pulumi package is based on the logdna Terraform Provider.
    logdna logo
    logdna 1.16.0 published on Monday, Apr 14, 2025 by logdna