@pulumi/wavefront
Version:
A Pulumi package for creating and managing wavefront cloud resources.
338 lines (337 loc) • 13.3 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "./types/input";
import * as outputs from "./types/output";
/**
* Provides a Wavefront Alert resource. This allows alerts to be created, updated, and deleted.
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as wavefront from "@pulumi/wavefront";
*
* const foobar = new wavefront.Alert("foobar", {
* name: "Test Alert",
* target: "test@example.com,target:alert-target-id",
* 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",
* ],
* });
* ```
*
* ## Import
*
* Alerts can be imported using the `id`, e.g.
*
* ```sh
* $ pulumi import wavefront:index/alert:Alert alert_target 1479868728473
* ```
*/
export declare class Alert extends pulumi.CustomResource {
/**
* Get an existing Alert resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name: string, id: pulumi.Input<pulumi.ID>, state?: AlertState, opts?: pulumi.CustomResourceOptions): Alert;
/**
* Returns true if the given object is an instance of Alert. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj: any): obj is Alert;
/**
* User-supplied additional explanatory information for this alert.
* Useful for linking runbooks, migrations, etc.
*/
readonly additionalInformation: pulumi.Output<string | undefined>;
/**
* A set of user-supplied dashboard and parameters to create dashboard links for triaging alerts.
*/
readonly alertTriageDashboards: pulumi.Output<outputs.AlertAlertTriageDashboard[] | undefined>;
/**
* The type of alert in Wavefront. Either `CLASSIC` (default)
* or `THRESHOLD`.
*/
readonly alertType: pulumi.Output<string | undefined>;
/**
* A list of valid users or groups that can modify this resource on a tenant.
*/
readonly canModifies: pulumi.Output<string[]>;
/**
* A list of valid users or groups that can view this resource on a tenant. Default is Empty list.
*/
readonly canViews: pulumi.Output<string[] | undefined>;
/**
* A Wavefront query that is evaluated at regular intervals (default is 1 minute).
* The alert fires and notifications are triggered when a data series matching this query evaluates
* to a non-zero value for a set number of consecutive minutes.
*/
readonly condition: pulumi.Output<string | undefined>;
/**
* a string->string map of `severity` to `condition`
* for which this alert will trigger.
*/
readonly conditions: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* 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.
*/
readonly displayExpression: pulumi.Output<string | undefined>;
/**
* The number of consecutive minutes that a series matching the condition query must
* evaluate to "true" (non-zero value) before the alert fires.
*/
readonly minutes: pulumi.Output<number>;
/**
* The name of the alert as it is displayed in Wavefront.
*/
readonly name: pulumi.Output<string>;
/**
* How often to re-trigger a continually failing alert.
* If absent or <= 0, no re-triggering occurs.
*/
readonly notificationResendFrequencyMinutes: pulumi.Output<number | undefined>;
/**
* The specified query is executed every `processRateMinutes` minutes. Default value is 5 minutes.
*/
readonly processRateMinutes: pulumi.Output<number | undefined>;
/**
* 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 defaults to
* the same value as `minutes`.
*/
readonly resolveAfterMinutes: pulumi.Output<number | undefined>;
/**
* A list of user-supplied runbook links for this alert.
*/
readonly runbookLinks: pulumi.Output<string[] | undefined>;
/**
* Severity of the alert, valid values are `INFO`, `SMOKE`, `WARN`, `SEVERE`.
*/
readonly severity: pulumi.Output<string>;
/**
* A set of tags to assign to this resource.
*/
readonly tags: pulumi.Output<string[]>;
/**
* A comma-separated list of the email address or integration endpoint
* (such as PagerDuty or webhook) to notify when the alert status changes. Multiple target types can be in the list.
* Alert target format: ({email}|pd:{pd_key}|target:{alert-target-id}).
*/
readonly target: pulumi.Output<string | undefined>;
/**
* A string to string map of Targets for severity.
*/
readonly thresholdTargets: pulumi.Output<{
[key: string]: string;
} | undefined>;
/**
* Create a Alert resource with the given unique name, arguments, and options.
*
* @param name The _unique_ name of the resource.
* @param args The arguments to use to populate this resource's properties.
* @param opts A bag of options that control this resource's behavior.
*/
constructor(name: string, args: AlertArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering Alert resources.
*/
export interface AlertState {
/**
* User-supplied additional explanatory information for this alert.
* Useful for linking runbooks, migrations, etc.
*/
additionalInformation?: pulumi.Input<string>;
/**
* A set of user-supplied dashboard and parameters to create dashboard links for triaging alerts.
*/
alertTriageDashboards?: pulumi.Input<pulumi.Input<inputs.AlertAlertTriageDashboard>[]>;
/**
* The type of alert in Wavefront. Either `CLASSIC` (default)
* or `THRESHOLD`.
*/
alertType?: pulumi.Input<string>;
/**
* A list of valid users or groups that can modify this resource on a tenant.
*/
canModifies?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of valid users or groups that can view this resource on a tenant. Default is Empty list.
*/
canViews?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A Wavefront query that is evaluated at regular intervals (default is 1 minute).
* The alert fires and notifications are triggered when a data series matching this query evaluates
* to a non-zero value for a set number of consecutive minutes.
*/
condition?: pulumi.Input<string>;
/**
* a string->string map of `severity` to `condition`
* for which this alert will trigger.
*/
conditions?: pulumi.Input<{
[key: string]: pulumi.Input<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.
*/
displayExpression?: pulumi.Input<string>;
/**
* The number of consecutive minutes that a series matching the condition query must
* evaluate to "true" (non-zero value) before the alert fires.
*/
minutes?: pulumi.Input<number>;
/**
* The name of the alert as it is displayed in Wavefront.
*/
name?: pulumi.Input<string>;
/**
* How often to re-trigger a continually failing alert.
* If absent or <= 0, no re-triggering occurs.
*/
notificationResendFrequencyMinutes?: pulumi.Input<number>;
/**
* The specified query is executed every `processRateMinutes` minutes. Default value is 5 minutes.
*/
processRateMinutes?: pulumi.Input<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 defaults to
* the same value as `minutes`.
*/
resolveAfterMinutes?: pulumi.Input<number>;
/**
* A list of user-supplied runbook links for this alert.
*/
runbookLinks?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Severity of the alert, valid values are `INFO`, `SMOKE`, `WARN`, `SEVERE`.
*/
severity?: pulumi.Input<string>;
/**
* A set of tags to assign to this resource.
*/
tags?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A comma-separated list of the email address or integration endpoint
* (such as PagerDuty or webhook) to notify when the alert status changes. Multiple target types can be in the list.
* Alert target format: ({email}|pd:{pd_key}|target:{alert-target-id}).
*/
target?: pulumi.Input<string>;
/**
* A string to string map of Targets for severity.
*/
thresholdTargets?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}
/**
* The set of arguments for constructing a Alert resource.
*/
export interface AlertArgs {
/**
* User-supplied additional explanatory information for this alert.
* Useful for linking runbooks, migrations, etc.
*/
additionalInformation?: pulumi.Input<string>;
/**
* A set of user-supplied dashboard and parameters to create dashboard links for triaging alerts.
*/
alertTriageDashboards?: pulumi.Input<pulumi.Input<inputs.AlertAlertTriageDashboard>[]>;
/**
* The type of alert in Wavefront. Either `CLASSIC` (default)
* or `THRESHOLD`.
*/
alertType?: pulumi.Input<string>;
/**
* A list of valid users or groups that can modify this resource on a tenant.
*/
canModifies?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A list of valid users or groups that can view this resource on a tenant. Default is Empty list.
*/
canViews?: pulumi.Input<pulumi.Input<string>[]>;
/**
* A Wavefront query that is evaluated at regular intervals (default is 1 minute).
* The alert fires and notifications are triggered when a data series matching this query evaluates
* to a non-zero value for a set number of consecutive minutes.
*/
condition?: pulumi.Input<string>;
/**
* a string->string map of `severity` to `condition`
* for which this alert will trigger.
*/
conditions?: pulumi.Input<{
[key: string]: pulumi.Input<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.
*/
displayExpression?: pulumi.Input<string>;
/**
* The number of consecutive minutes that a series matching the condition query must
* evaluate to "true" (non-zero value) before the alert fires.
*/
minutes: pulumi.Input<number>;
/**
* The name of the alert as it is displayed in Wavefront.
*/
name?: pulumi.Input<string>;
/**
* How often to re-trigger a continually failing alert.
* If absent or <= 0, no re-triggering occurs.
*/
notificationResendFrequencyMinutes?: pulumi.Input<number>;
/**
* The specified query is executed every `processRateMinutes` minutes. Default value is 5 minutes.
*/
processRateMinutes?: pulumi.Input<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 defaults to
* the same value as `minutes`.
*/
resolveAfterMinutes?: pulumi.Input<number>;
/**
* A list of user-supplied runbook links for this alert.
*/
runbookLinks?: pulumi.Input<pulumi.Input<string>[]>;
/**
* Severity of the alert, valid values are `INFO`, `SMOKE`, `WARN`, `SEVERE`.
*/
severity?: pulumi.Input<string>;
/**
* A set of tags to assign to this resource.
*/
tags: pulumi.Input<pulumi.Input<string>[]>;
/**
* A comma-separated list of the email address or integration endpoint
* (such as PagerDuty or webhook) to notify when the alert status changes. Multiple target types can be in the list.
* Alert target format: ({email}|pd:{pd_key}|target:{alert-target-id}).
*/
target?: pulumi.Input<string>;
/**
* A string to string map of Targets for severity.
*/
thresholdTargets?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
}