@pulumiverse/grafana
Version:
A Pulumi package for creating and managing grafana.
118 lines (117 loc) • 3.93 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
import * as inputs from "../types/input";
import * as outputs from "../types/output";
/**
* Manages alerts for a check in Grafana Synthetic Monitoring.
*
* * [Official documentation](https://grafana.com/docs/grafana-cloud/testing/synthetic-monitoring/configure-alerts/configure-per-check-alerts/)
*
* ## Example Usage
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as grafana from "@pulumiverse/grafana";
*
* const main = new grafana.syntheticmonitoring.Check("main", {
* job: "Check Alert Test",
* target: "https://grafana.com",
* enabled: true,
* probes: [1],
* labels: {},
* settings: {
* http: {
* ipVersion: "V4",
* method: "GET",
* },
* },
* });
* const mainCheckAlerts = new grafana.syntheticmonitoring.CheckAlerts("main", {
* checkId: main.id,
* alerts: [
* {
* name: "ProbeFailedExecutionsTooHigh",
* threshold: 1,
* period: "15m",
* runbookUrl: "",
* },
* {
* name: "TLSTargetCertificateCloseToExpiring",
* threshold: 14,
* period: "",
* runbookUrl: "",
* },
* {
* name: "HTTPRequestDurationTooHighAvg",
* threshold: 5000,
* period: "10m",
* runbookUrl: "https://wiki.company.com/runbooks/http-duration",
* },
* ],
* });
* ```
*
* ## Import
*
* ```sh
* terraform import grafana_synthetic_monitoring_check_alerts.name "{{ check_id }}"
* ```
*/
export declare class CheckAlerts extends pulumi.CustomResource {
/**
* Get an existing CheckAlerts 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?: CheckAlertsState, opts?: pulumi.CustomResourceOptions): CheckAlerts;
/**
* Returns true if the given object is an instance of CheckAlerts. 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 CheckAlerts;
/**
* List of alerts for the check.
*/
readonly alerts: pulumi.Output<outputs.syntheticMonitoring.CheckAlertsAlert[]>;
/**
* The ID of the check to manage alerts for.
*/
readonly checkId: pulumi.Output<number>;
/**
* Create a CheckAlerts 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: CheckAlertsArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering CheckAlerts resources.
*/
export interface CheckAlertsState {
/**
* List of alerts for the check.
*/
alerts?: pulumi.Input<pulumi.Input<inputs.syntheticMonitoring.CheckAlertsAlert>[]>;
/**
* The ID of the check to manage alerts for.
*/
checkId?: pulumi.Input<number>;
}
/**
* The set of arguments for constructing a CheckAlerts resource.
*/
export interface CheckAlertsArgs {
/**
* List of alerts for the check.
*/
alerts: pulumi.Input<pulumi.Input<inputs.syntheticMonitoring.CheckAlertsAlert>[]>;
/**
* The ID of the check to manage alerts for.
*/
checkId: pulumi.Input<number>;
}