The Automation API is now available. No CLI. No human-in-the-loop. Just your code. Learn More

Alert

Provides a Wavefront Alert resource. This allows alerts to be created, updated, and deleted.

Example Usage

using Pulumi;
using Wavefront = Pulumi.Wavefront;

class MyStack : Stack
{
    public MyStack()
    {
        var foobar = new Wavefront.Alert("foobar", new Wavefront.AlertArgs
        {
            Condition = "100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total ) > 80",
            DisplayExpression = "100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total )",
            Minutes = 5,
            ResolveAfterMinutes = 5,
            Severity = "WARN",
            Tags = 
            {
                "terraform",
                "test",
            },
            Target = "test@example.com",
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-wavefront/sdk/go/wavefront"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := wavefront.NewAlert(ctx, "foobar", &wavefront.AlertArgs{
            Condition:           pulumi.String("100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total ) > 80"),
            DisplayExpression:   pulumi.String("100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total )"),
            Minutes:             pulumi.Int(5),
            ResolveAfterMinutes: pulumi.Int(5),
            Severity:            pulumi.String("WARN"),
            Tags: pulumi.StringArray{
                pulumi.String("terraform"),
                pulumi.String("test"),
            },
            Target: pulumi.String("test@example.com"),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_wavefront as wavefront

foobar = wavefront.Alert("foobar",
    condition="100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total ) > 80",
    display_expression="100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total )",
    minutes=5,
    resolve_after_minutes=5,
    severity="WARN",
    tags=[
        "terraform",
        "test",
    ],
    target="test@example.com")
import * as pulumi from "@pulumi/pulumi";
import * as wavefront from "@pulumi/wavefront";

const foobar = new wavefront.Alert("foobar", {
    condition: "100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total ) > 80",
    displayExpression: "100-ts(\"cpu.usage_idle\", environment=preprod and cpu=cpu-total )",
    minutes: 5,
    resolveAfterMinutes: 5,
    severity: "WARN",
    tags: [
        "terraform",
        "test",
    ],
    target: "test@example.com",
});

Create a Alert Resource

new Alert(name: string, args: AlertArgs, opts?: CustomResourceOptions);
def Alert(resource_name: str, opts: Optional[ResourceOptions] = None, additional_information: Optional[str] = None, alert_type: Optional[str] = None, can_modifies: Optional[Sequence[str]] = None, can_views: Optional[Sequence[str]] = None, condition: Optional[str] = None, conditions: Optional[Mapping[str, str]] = None, display_expression: Optional[str] = None, minutes: Optional[int] = None, name: Optional[str] = None, notification_resend_frequency_minutes: Optional[int] = None, resolve_after_minutes: Optional[int] = None, severity: Optional[str] = None, tags: Optional[Sequence[str]] = None, target: Optional[str] = None, threshold_targets: Optional[Mapping[str, str]] = None)
func NewAlert(ctx *Context, name string, args AlertArgs, opts ...ResourceOption) (*Alert, error)
public Alert(string name, AlertArgs args, CustomResourceOptions? opts = null)
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.
opts ResourceOptions
A bag of options that control this 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.

Alert Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The Alert resource accepts the following input properties:

Minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

Tags List<string>

A set of tags to assign to this resource.

AdditionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

AlertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

CanModifies List<string>

A list of users or groups that can modify this resource.

CanViews List<string>

A list of users or groups that can view this resource.

Condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

Conditions Dictionary<string, string>

a string->string map of severity to condition for which this alert will trigger.

DisplayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

Name string

The name of the alert as it is displayed in Wavefront.

NotificationResendFrequencyMinutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

ResolveAfterMinutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

Severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
Target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

ThresholdTargets Dictionary<string, string>

Targets for severity

Minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

Tags []string

A set of tags to assign to this resource.

AdditionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

AlertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

CanModifies []string

A list of users or groups that can modify this resource.

CanViews []string

A list of users or groups that can view this resource.

Condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

Conditions map[string]string

a string->string map of severity to condition for which this alert will trigger.

DisplayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

Name string

The name of the alert as it is displayed in Wavefront.

NotificationResendFrequencyMinutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

ResolveAfterMinutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

Severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
Target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

ThresholdTargets map[string]string

Targets for severity

minutes number

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

tags string[]

A set of tags to assign to this resource.

additionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

alertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

canModifies string[]

A list of users or groups that can modify this resource.

canViews string[]

A list of users or groups that can view this resource.

condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

conditions {[key: string]: string}

a string->string map of severity to condition for which this alert will trigger.

displayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

name string

The name of the alert as it is displayed in Wavefront.

notificationResendFrequencyMinutes number

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

resolveAfterMinutes number

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

thresholdTargets {[key: string]: string}

Targets for severity

minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

tags Sequence[str]

A set of tags to assign to this resource.

additional_information str

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

alert_type str

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

can_modifies Sequence[str]

A list of users or groups that can modify this resource.

can_views Sequence[str]

A list of users or groups that can view this resource.

condition str

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

conditions Mapping[str, str]

a string->string map of severity to condition for which this alert will trigger.

display_expression str

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

name str

The name of the alert as it is displayed in Wavefront.

notification_resend_frequency_minutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

resolve_after_minutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

severity str
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
target str

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

threshold_targets Mapping[str, str]

Targets for severity

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 str
The provider-assigned unique ID for this managed resource.

Look up an 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, additional_information: Optional[str] = None, alert_type: Optional[str] = None, can_modifies: Optional[Sequence[str]] = None, can_views: Optional[Sequence[str]] = None, condition: Optional[str] = None, conditions: Optional[Mapping[str, str]] = None, display_expression: Optional[str] = None, minutes: Optional[int] = None, name: Optional[str] = None, notification_resend_frequency_minutes: Optional[int] = None, resolve_after_minutes: Optional[int] = None, severity: Optional[str] = None, tags: Optional[Sequence[str]] = None, target: Optional[str] = None, threshold_targets: Optional[Mapping[str, str]] = 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)
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.

The following state arguments are supported:

AdditionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

AlertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

CanModifies List<string>

A list of users or groups that can modify this resource.

CanViews List<string>

A list of users or groups that can view this resource.

Condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

Conditions Dictionary<string, string>

a string->string map of severity to condition for which this alert will trigger.

DisplayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

Minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

Name string

The name of the alert as it is displayed in Wavefront.

NotificationResendFrequencyMinutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

ResolveAfterMinutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

Severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
Tags List<string>

A set of tags to assign to this resource.

Target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

ThresholdTargets Dictionary<string, string>

Targets for severity

AdditionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

AlertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

CanModifies []string

A list of users or groups that can modify this resource.

CanViews []string

A list of users or groups that can view this resource.

Condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

Conditions map[string]string

a string->string map of severity to condition for which this alert will trigger.

DisplayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

Minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

Name string

The name of the alert as it is displayed in Wavefront.

NotificationResendFrequencyMinutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

ResolveAfterMinutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

Severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
Tags []string

A set of tags to assign to this resource.

Target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

ThresholdTargets map[string]string

Targets for severity

additionalInformation string

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

alertType string

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

canModifies string[]

A list of users or groups that can modify this resource.

canViews string[]

A list of users or groups that can view this resource.

condition string

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

conditions {[key: string]: string}

a string->string map of severity to condition for which this alert will trigger.

displayExpression string

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

minutes number

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

name string

The name of the alert as it is displayed in Wavefront.

notificationResendFrequencyMinutes number

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

resolveAfterMinutes number

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

severity string
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
tags string[]

A set of tags to assign to this resource.

target string

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

thresholdTargets {[key: string]: string}

Targets for severity

additional_information str

User-supplied additional explanatory information for this alert. Useful for linking runbooks, migrations…etc

alert_type str

The type of alert in Wavefront. Either CLASSIC (default) or THRESHOLD

can_modifies Sequence[str]

A list of users or groups that can modify this resource.

can_views Sequence[str]

A list of users or groups that can view this resource.

condition str

A Wavefront query that is evaluated at regular intervals (default 1m). The alert fires and notifications are triggered when data series matching this query evaluates to a non-zero value for a set number of consecutive minutes.

conditions Mapping[str, str]

a string->string map of severity to condition for which this alert will trigger.

display_expression str

A second query whose results are displayed in the alert user interface instead of the condition query. This field is often used to display a version of the condition query with Boolean operators removed so that numerical values are plotted.

minutes int

The number of consecutive minutes that a series matching the condition query must evaluate to “true” (non-zero value) before the alert fires.

name str

The name of the alert as it is displayed in Wavefront.

notification_resend_frequency_minutes int

How often to re-trigger a continually failing alert. If absent or <= 0, no re-triggering occur.

resolve_after_minutes int

The number of consecutive minutes that a firing series matching the condition query must evaluate to “false” (zero value) before the alert resolves. When unset, this default sto the same value as minutes.

severity str
  • Severity of the alert, valid values are INFO, SMOKE, WARN, SEVERE.
tags Sequence[str]

A set of tags to assign to this resource.

target str

A comma-separated list of the email address or integration endpoint (such as PagerDuty or web hook) to notify when the alert status changes.

threshold_targets Mapping[str, str]

Targets for severity

Package Details

Repository
https://github.com/pulumi/pulumi-wavefront
License
Apache-2.0
Notes
This Pulumi package is based on the wavefront Terraform Provider.