newrelic.AlertCondition
Explore with Pulumi AI
Use this resource to create and manage alert conditions for APM, Browser, and Mobile in New Relic.
NOTE: This is a legacy resource. The newrelic.NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. This condition type may be deprecated in the future.
Terms
The term
mapping supports the following arguments:
duration
- (Required) In minutes, must be in the range of5
to120
, inclusive.operator
- (Optional)above
,below
, orequal
. Defaults toequal
.priority
- (Optional)critical
orwarning
. Defaults tocritical
. Terms must include at least onecritical
priority termthreshold
- (Required) Must be 0 or greater.time_function
- (Required)all
orany
.
Tags
Manage alert condition tags with newrelic.EntityTags
. For up-to-date documentation about the tagging resource, please check newrelic.EntityTags
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const fooEntity = newrelic.getEntity({
name: "foo entitiy",
});
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooAlertCondition = new newrelic.AlertCondition("fooAlertCondition", {
policyId: fooAlertPolicy.id,
type: "apm_app_metric",
entities: [fooEntity.then(fooEntity => fooEntity.applicationId)],
metric: "apdex",
runbookUrl: "https://www.example.com",
conditionScope: "application",
terms: [{
duration: 5,
operator: "below",
priority: "critical",
threshold: 0.75,
timeFunction: "all",
}],
});
const myConditionEntityTags = new newrelic.EntityTags("myConditionEntityTags", {
guid: fooAlertCondition.entityGuid,
tags: [
{
key: "my-key",
values: [
"my-value",
"my-other-value",
],
},
{
key: "my-key-2",
values: ["my-value-2"],
},
],
});
import pulumi
import pulumi_newrelic as newrelic
foo_entity = newrelic.get_entity(name="foo entitiy")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
policy_id=foo_alert_policy.id,
type="apm_app_metric",
entities=[foo_entity.application_id],
metric="apdex",
runbook_url="https://www.example.com",
condition_scope="application",
terms=[newrelic.AlertConditionTermArgs(
duration=5,
operator="below",
priority="critical",
threshold=0.75,
time_function="all",
)])
my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
guid=foo_alert_condition.entity_guid,
tags=[
newrelic.EntityTagsTagArgs(
key="my-key",
values=[
"my-value",
"my-other-value",
],
),
newrelic.EntityTagsTagArgs(
key="my-key-2",
values=["my-value-2"],
),
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var fooEntity = NewRelic.GetEntity.Invoke(new()
{
Name = "foo entitiy",
});
var fooAlertPolicy = new NewRelic.AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new NewRelic.AlertCondition("fooAlertCondition", new()
{
PolicyId = fooAlertPolicy.Id,
Type = "apm_app_metric",
Entities = new[]
{
fooEntity.Apply(getEntityResult => getEntityResult.ApplicationId),
},
Metric = "apdex",
RunbookUrl = "https://www.example.com",
ConditionScope = "application",
Terms = new[]
{
new NewRelic.Inputs.AlertConditionTermArgs
{
Duration = 5,
Operator = "below",
Priority = "critical",
Threshold = 0.75,
TimeFunction = "all",
},
},
});
var myConditionEntityTags = new NewRelic.EntityTags("myConditionEntityTags", new()
{
Guid = fooAlertCondition.EntityGuid,
Tags = new[]
{
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key",
Values = new[]
{
"my-value",
"my-other-value",
},
},
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key-2",
Values = new[]
{
"my-value-2",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooEntity, err := newrelic.GetEntity(ctx, &newrelic.GetEntityArgs{
Name: "foo entitiy",
}, nil)
if err != nil {
return err
}
fooAlertPolicy, err := newrelic.NewAlertPolicy(ctx, "fooAlertPolicy", nil)
if err != nil {
return err
}
fooAlertCondition, err := newrelic.NewAlertCondition(ctx, "fooAlertCondition", &newrelic.AlertConditionArgs{
PolicyId: fooAlertPolicy.ID(),
Type: pulumi.String("apm_app_metric"),
Entities: pulumi.IntArray{
*pulumi.Int(fooEntity.ApplicationId),
},
Metric: pulumi.String("apdex"),
RunbookUrl: pulumi.String("https://www.example.com"),
ConditionScope: pulumi.String("application"),
Terms: newrelic.AlertConditionTermArray{
&newrelic.AlertConditionTermArgs{
Duration: pulumi.Int(5),
Operator: pulumi.String("below"),
Priority: pulumi.String("critical"),
Threshold: pulumi.Float64(0.75),
TimeFunction: pulumi.String("all"),
},
},
})
if err != nil {
return err
}
_, err = newrelic.NewEntityTags(ctx, "myConditionEntityTags", &newrelic.EntityTagsArgs{
Guid: fooAlertCondition.EntityGuid,
Tags: newrelic.EntityTagsTagArray{
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key"),
Values: pulumi.StringArray{
pulumi.String("my-value"),
pulumi.String("my-other-value"),
},
},
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key-2"),
Values: pulumi.StringArray{
pulumi.String("my-value-2"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NewrelicFunctions;
import com.pulumi.newrelic.inputs.GetEntityArgs;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertCondition;
import com.pulumi.newrelic.AlertConditionArgs;
import com.pulumi.newrelic.inputs.AlertConditionTermArgs;
import com.pulumi.newrelic.EntityTags;
import com.pulumi.newrelic.EntityTagsArgs;
import com.pulumi.newrelic.inputs.EntityTagsTagArgs;
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) {
final var fooEntity = NewrelicFunctions.getEntity(GetEntityArgs.builder()
.name("foo entitiy")
.build());
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new AlertCondition("fooAlertCondition", AlertConditionArgs.builder()
.policyId(fooAlertPolicy.id())
.type("apm_app_metric")
.entities(fooEntity.applyValue(getEntityResult -> getEntityResult.applicationId()))
.metric("apdex")
.runbookUrl("https://www.example.com")
.conditionScope("application")
.terms(AlertConditionTermArgs.builder()
.duration(5)
.operator("below")
.priority("critical")
.threshold("0.75")
.timeFunction("all")
.build())
.build());
var myConditionEntityTags = new EntityTags("myConditionEntityTags", EntityTagsArgs.builder()
.guid(fooAlertCondition.entityGuid())
.tags(
EntityTagsTagArgs.builder()
.key("my-key")
.values(
"my-value",
"my-other-value")
.build(),
EntityTagsTagArgs.builder()
.key("my-key-2")
.values("my-value-2")
.build())
.build());
}
}
resources:
fooAlertPolicy:
type: newrelic:AlertPolicy
fooAlertCondition:
type: newrelic:AlertCondition
properties:
policyId: ${fooAlertPolicy.id}
type: apm_app_metric
entities:
- ${fooEntity.applicationId}
metric: apdex
runbookUrl: https://www.example.com
conditionScope: application
terms:
- duration: 5
operator: below
priority: critical
threshold: '0.75'
timeFunction: all
myConditionEntityTags:
type: newrelic:EntityTags
properties:
guid: ${fooAlertCondition.entityGuid}
tags:
- key: my-key
values:
- my-value
- my-other-value
- key: my-key-2
values:
- my-value-2
variables:
fooEntity:
fn::invoke:
Function: newrelic:getEntity
Arguments:
name: foo entitiy
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var app = NewRelic.GetEntity.Invoke(new()
{
Name = "my-app",
Type = "APPLICATION",
Domain = "APM",
});
var fooAlertPolicy = new NewRelic.AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new NewRelic.AlertCondition("fooAlertCondition", new()
{
PolicyId = fooAlertPolicy.Id,
Type = "apm_app_metric",
Entities = new[]
{
app.Apply(getEntityResult => getEntityResult.ApplicationId),
},
Metric = "apdex",
RunbookUrl = "https://www.example.com",
ConditionScope = "application",
Terms = new[]
{
new NewRelic.Inputs.AlertConditionTermArgs
{
Duration = 5,
Operator = "below",
Priority = "critical",
Threshold = 0.75,
TimeFunction = "all",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
app, err := newrelic.GetEntity(ctx, &newrelic.GetEntityArgs{
Name: "my-app",
Type: pulumi.StringRef("APPLICATION"),
Domain: pulumi.StringRef("APM"),
}, nil)
if err != nil {
return err
}
fooAlertPolicy, err := newrelic.NewAlertPolicy(ctx, "fooAlertPolicy", nil)
if err != nil {
return err
}
_, err = newrelic.NewAlertCondition(ctx, "fooAlertCondition", &newrelic.AlertConditionArgs{
PolicyId: fooAlertPolicy.ID(),
Type: pulumi.String("apm_app_metric"),
Entities: pulumi.IntArray{
*pulumi.Int(app.ApplicationId),
},
Metric: pulumi.String("apdex"),
RunbookUrl: pulumi.String("https://www.example.com"),
ConditionScope: pulumi.String("application"),
Terms: newrelic.AlertConditionTermArray{
&newrelic.AlertConditionTermArgs{
Duration: pulumi.Int(5),
Operator: pulumi.String("below"),
Priority: pulumi.String("critical"),
Threshold: pulumi.Float64(0.75),
TimeFunction: pulumi.String("all"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NewrelicFunctions;
import com.pulumi.newrelic.inputs.GetEntityArgs;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertCondition;
import com.pulumi.newrelic.AlertConditionArgs;
import com.pulumi.newrelic.inputs.AlertConditionTermArgs;
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) {
final var app = NewrelicFunctions.getEntity(GetEntityArgs.builder()
.name("my-app")
.type("APPLICATION")
.domain("APM")
.build());
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new AlertCondition("fooAlertCondition", AlertConditionArgs.builder()
.policyId(fooAlertPolicy.id())
.type("apm_app_metric")
.entities(app.applyValue(getEntityResult -> getEntityResult.applicationId()))
.metric("apdex")
.runbookUrl("https://www.example.com")
.conditionScope("application")
.terms(AlertConditionTermArgs.builder()
.duration(5)
.operator("below")
.priority("critical")
.threshold("0.75")
.timeFunction("all")
.build())
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
app = newrelic.get_entity(name="my-app",
type="APPLICATION",
domain="APM")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
policy_id=foo_alert_policy.id,
type="apm_app_metric",
entities=[app.application_id],
metric="apdex",
runbook_url="https://www.example.com",
condition_scope="application",
terms=[newrelic.AlertConditionTermArgs(
duration=5,
operator="below",
priority="critical",
threshold=0.75,
time_function="all",
)])
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const app = newrelic.getEntity({
name: "my-app",
type: "APPLICATION",
domain: "APM",
});
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooAlertCondition = new newrelic.AlertCondition("fooAlertCondition", {
policyId: fooAlertPolicy.id,
type: "apm_app_metric",
entities: [app.then(app => app.applicationId)],
metric: "apdex",
runbookUrl: "https://www.example.com",
conditionScope: "application",
terms: [{
duration: 5,
operator: "below",
priority: "critical",
threshold: 0.75,
timeFunction: "all",
}],
});
resources:
fooAlertPolicy:
type: newrelic:AlertPolicy
fooAlertCondition:
type: newrelic:AlertCondition
properties:
policyId: ${fooAlertPolicy.id}
type: apm_app_metric
entities:
- ${app.applicationId}
metric: apdex
runbookUrl: https://www.example.com
conditionScope: application
terms:
- duration: 5
operator: below
priority: critical
threshold: '0.75'
timeFunction: all
variables:
app:
fn::invoke:
Function: newrelic:getEntity
Arguments:
name: my-app
type: APPLICATION
domain: APM
. For up-to-date documentation about the tagging resource, please check newrelic.EntityTags
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using NewRelic = Pulumi.NewRelic;
return await Deployment.RunAsync(() =>
{
var fooEntity = NewRelic.GetEntity.Invoke(new()
{
Name = "foo entitiy",
});
var fooAlertPolicy = new NewRelic.AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new NewRelic.AlertCondition("fooAlertCondition", new()
{
PolicyId = fooAlertPolicy.Id,
Type = "apm_app_metric",
Entities = new[]
{
fooEntity.Apply(getEntityResult => getEntityResult.ApplicationId),
},
Metric = "apdex",
RunbookUrl = "https://www.example.com",
ConditionScope = "application",
Terms = new[]
{
new NewRelic.Inputs.AlertConditionTermArgs
{
Duration = 5,
Operator = "below",
Priority = "critical",
Threshold = 0.75,
TimeFunction = "all",
},
},
});
var myConditionEntityTags = new NewRelic.EntityTags("myConditionEntityTags", new()
{
Guid = fooAlertCondition.EntityGuid,
Tags = new[]
{
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key",
Values = new[]
{
"my-value",
"my-other-value",
},
},
new NewRelic.Inputs.EntityTagsTagArgs
{
Key = "my-key-2",
Values = new[]
{
"my-value-2",
},
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-newrelic/sdk/v5/go/newrelic"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
fooEntity, err := newrelic.GetEntity(ctx, &newrelic.GetEntityArgs{
Name: "foo entitiy",
}, nil)
if err != nil {
return err
}
fooAlertPolicy, err := newrelic.NewAlertPolicy(ctx, "fooAlertPolicy", nil)
if err != nil {
return err
}
fooAlertCondition, err := newrelic.NewAlertCondition(ctx, "fooAlertCondition", &newrelic.AlertConditionArgs{
PolicyId: fooAlertPolicy.ID(),
Type: pulumi.String("apm_app_metric"),
Entities: pulumi.IntArray{
*pulumi.Int(fooEntity.ApplicationId),
},
Metric: pulumi.String("apdex"),
RunbookUrl: pulumi.String("https://www.example.com"),
ConditionScope: pulumi.String("application"),
Terms: newrelic.AlertConditionTermArray{
&newrelic.AlertConditionTermArgs{
Duration: pulumi.Int(5),
Operator: pulumi.String("below"),
Priority: pulumi.String("critical"),
Threshold: pulumi.Float64(0.75),
TimeFunction: pulumi.String("all"),
},
},
})
if err != nil {
return err
}
_, err = newrelic.NewEntityTags(ctx, "myConditionEntityTags", &newrelic.EntityTagsArgs{
Guid: fooAlertCondition.EntityGuid,
Tags: newrelic.EntityTagsTagArray{
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key"),
Values: pulumi.StringArray{
pulumi.String("my-value"),
pulumi.String("my-other-value"),
},
},
&newrelic.EntityTagsTagArgs{
Key: pulumi.String("my-key-2"),
Values: pulumi.StringArray{
pulumi.String("my-value-2"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.newrelic.NewrelicFunctions;
import com.pulumi.newrelic.inputs.GetEntityArgs;
import com.pulumi.newrelic.AlertPolicy;
import com.pulumi.newrelic.AlertCondition;
import com.pulumi.newrelic.AlertConditionArgs;
import com.pulumi.newrelic.inputs.AlertConditionTermArgs;
import com.pulumi.newrelic.EntityTags;
import com.pulumi.newrelic.EntityTagsArgs;
import com.pulumi.newrelic.inputs.EntityTagsTagArgs;
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) {
final var fooEntity = NewrelicFunctions.getEntity(GetEntityArgs.builder()
.name("foo entitiy")
.build());
var fooAlertPolicy = new AlertPolicy("fooAlertPolicy");
var fooAlertCondition = new AlertCondition("fooAlertCondition", AlertConditionArgs.builder()
.policyId(fooAlertPolicy.id())
.type("apm_app_metric")
.entities(fooEntity.applyValue(getEntityResult -> getEntityResult.applicationId()))
.metric("apdex")
.runbookUrl("https://www.example.com")
.conditionScope("application")
.terms(AlertConditionTermArgs.builder()
.duration(5)
.operator("below")
.priority("critical")
.threshold("0.75")
.timeFunction("all")
.build())
.build());
var myConditionEntityTags = new EntityTags("myConditionEntityTags", EntityTagsArgs.builder()
.guid(fooAlertCondition.entityGuid())
.tags(
EntityTagsTagArgs.builder()
.key("my-key")
.values(
"my-value",
"my-other-value")
.build(),
EntityTagsTagArgs.builder()
.key("my-key-2")
.values("my-value-2")
.build())
.build());
}
}
import pulumi
import pulumi_newrelic as newrelic
foo_entity = newrelic.get_entity(name="foo entitiy")
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
policy_id=foo_alert_policy.id,
type="apm_app_metric",
entities=[foo_entity.application_id],
metric="apdex",
runbook_url="https://www.example.com",
condition_scope="application",
terms=[newrelic.AlertConditionTermArgs(
duration=5,
operator="below",
priority="critical",
threshold=0.75,
time_function="all",
)])
my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
guid=foo_alert_condition.entity_guid,
tags=[
newrelic.EntityTagsTagArgs(
key="my-key",
values=[
"my-value",
"my-other-value",
],
),
newrelic.EntityTagsTagArgs(
key="my-key-2",
values=["my-value-2"],
),
])
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const fooEntity = newrelic.getEntity({
name: "foo entitiy",
});
const fooAlertPolicy = new newrelic.AlertPolicy("fooAlertPolicy", {});
const fooAlertCondition = new newrelic.AlertCondition("fooAlertCondition", {
policyId: fooAlertPolicy.id,
type: "apm_app_metric",
entities: [fooEntity.then(fooEntity => fooEntity.applicationId)],
metric: "apdex",
runbookUrl: "https://www.example.com",
conditionScope: "application",
terms: [{
duration: 5,
operator: "below",
priority: "critical",
threshold: 0.75,
timeFunction: "all",
}],
});
const myConditionEntityTags = new newrelic.EntityTags("myConditionEntityTags", {
guid: fooAlertCondition.entityGuid,
tags: [
{
key: "my-key",
values: [
"my-value",
"my-other-value",
],
},
{
key: "my-key-2",
values: ["my-value-2"],
},
],
});
resources:
fooAlertPolicy:
type: newrelic:AlertPolicy
fooAlertCondition:
type: newrelic:AlertCondition
properties:
policyId: ${fooAlertPolicy.id}
type: apm_app_metric
entities:
- ${fooEntity.applicationId}
metric: apdex
runbookUrl: https://www.example.com
conditionScope: application
terms:
- duration: 5
operator: below
priority: critical
threshold: '0.75'
timeFunction: all
myConditionEntityTags:
type: newrelic:EntityTags
properties:
guid: ${fooAlertCondition.entityGuid}
tags:
- key: my-key
values:
- my-value
- my-other-value
- key: my-key-2
values:
- my-value-2
variables:
fooEntity:
fn::invoke:
Function: newrelic:getEntity
Arguments:
name: foo entitiy
Create AlertCondition Resource
new AlertCondition(name: string, args: AlertConditionArgs, opts?: CustomResourceOptions);
@overload
def AlertCondition(resource_name: str,
opts: Optional[ResourceOptions] = None,
condition_scope: Optional[str] = None,
enabled: Optional[bool] = None,
entities: Optional[Sequence[int]] = None,
gc_metric: Optional[str] = None,
metric: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[int] = None,
runbook_url: Optional[str] = None,
terms: Optional[Sequence[AlertConditionTermArgs]] = None,
type: Optional[str] = None,
user_defined_metric: Optional[str] = None,
user_defined_value_function: Optional[str] = None,
violation_close_timer: Optional[int] = None)
@overload
def AlertCondition(resource_name: str,
args: AlertConditionArgs,
opts: Optional[ResourceOptions] = None)
func NewAlertCondition(ctx *Context, name string, args AlertConditionArgs, opts ...ResourceOption) (*AlertCondition, error)
public AlertCondition(string name, AlertConditionArgs args, CustomResourceOptions? opts = null)
public AlertCondition(String name, AlertConditionArgs args)
public AlertCondition(String name, AlertConditionArgs args, CustomResourceOptions options)
type: newrelic:AlertCondition
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertConditionArgs
- 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 AlertConditionArgs
- 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 AlertConditionArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlertConditionArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlertConditionArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AlertCondition Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
The AlertCondition resource accepts the following input properties:
- Entities List<int>
The instance IDs associated with this condition.
- Metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- Policy
Id int The ID of the policy where this condition should be used.
- Terms
List<Pulumi.
New Relic. Inputs. Alert Condition Term> A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- Condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Violation
Close intTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- Entities []int
The instance IDs associated with this condition.
- Metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- Policy
Id int The ID of the policy where this condition should be used.
- Terms
[]Alert
Condition Term Args A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- Condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Runbook
Url string Runbook URL to display in notifications.
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Violation
Close intTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- entities List<Integer>
The instance IDs associated with this condition.
- metric String
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- policy
Id Integer The ID of the policy where this condition should be used.
- terms
List<Alert
Condition Term> A list of terms for this condition. See Terms below for details.
- type String
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- condition
Scope String application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled Boolean
Whether the condition is enabled or not. Defaults to true.
- gc
Metric String A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- name String
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url String Runbook URL to display in notifications.
- user
Defined StringMetric A custom metric to be evaluated.
- user
Defined StringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close IntegerTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- entities number[]
The instance IDs associated with this condition.
- metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- policy
Id number The ID of the policy where this condition should be used.
- terms
Alert
Condition Term[] A list of terms for this condition. See Terms below for details.
- type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled boolean
Whether the condition is enabled or not. Defaults to true.
- gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url string Runbook URL to display in notifications.
- user
Defined stringMetric A custom metric to be evaluated.
- user
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close numberTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- entities Sequence[int]
The instance IDs associated with this condition.
- metric str
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- policy_
id int The ID of the policy where this condition should be used.
- terms
Sequence[Alert
Condition Term Args] A list of terms for this condition. See Terms below for details.
- type str
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- condition_
scope str application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled bool
Whether the condition is enabled or not. Defaults to true.
- gc_
metric str A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- name str
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook_
url str Runbook URL to display in notifications.
- user_
defined_ strmetric A custom metric to be evaluated.
- user_
defined_ strvalue_ function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation_
close_ inttimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- entities List<Number>
The instance IDs associated with this condition.
- metric String
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- policy
Id Number The ID of the policy where this condition should be used.
- terms List<Property Map>
A list of terms for this condition. See Terms below for details.
- type String
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- condition
Scope String application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled Boolean
Whether the condition is enabled or not. Defaults to true.
- gc
Metric String A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- name String
The title of the condition. Must be between 1 and 64 characters, inclusive.
- runbook
Url String Runbook URL to display in notifications.
- user
Defined StringMetric A custom metric to be evaluated.
- user
Defined StringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close NumberTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
Outputs
All input properties are implicitly available as output properties. Additionally, the AlertCondition resource produces the following output properties:
- Entity
Guid string The unique entity identifier of the condition in New Relic.
- Id string
The provider-assigned unique ID for this managed resource.
- Entity
Guid string The unique entity identifier of the condition in New Relic.
- Id string
The provider-assigned unique ID for this managed resource.
- entity
Guid String The unique entity identifier of the condition in New Relic.
- id String
The provider-assigned unique ID for this managed resource.
- entity
Guid string The unique entity identifier of the condition in New Relic.
- id string
The provider-assigned unique ID for this managed resource.
- entity_
guid str The unique entity identifier of the condition in New Relic.
- id str
The provider-assigned unique ID for this managed resource.
- entity
Guid String The unique entity identifier of the condition in New Relic.
- id String
The provider-assigned unique ID for this managed resource.
Look up Existing AlertCondition Resource
Get an existing AlertCondition 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?: AlertConditionState, opts?: CustomResourceOptions): AlertCondition
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
condition_scope: Optional[str] = None,
enabled: Optional[bool] = None,
entities: Optional[Sequence[int]] = None,
entity_guid: Optional[str] = None,
gc_metric: Optional[str] = None,
metric: Optional[str] = None,
name: Optional[str] = None,
policy_id: Optional[int] = None,
runbook_url: Optional[str] = None,
terms: Optional[Sequence[AlertConditionTermArgs]] = None,
type: Optional[str] = None,
user_defined_metric: Optional[str] = None,
user_defined_value_function: Optional[str] = None,
violation_close_timer: Optional[int] = None) -> AlertCondition
func GetAlertCondition(ctx *Context, name string, id IDInput, state *AlertConditionState, opts ...ResourceOption) (*AlertCondition, error)
public static AlertCondition Get(string name, Input<string> id, AlertConditionState? state, CustomResourceOptions? opts = null)
public static AlertCondition get(String name, Output<String> id, AlertConditionState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- Condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Entities List<int>
The instance IDs associated with this condition.
- Entity
Guid string The unique entity identifier of the condition in New Relic.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- Metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- Terms
List<Pulumi.
New Relic. Inputs. Alert Condition Term> A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Violation
Close intTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- Condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- Enabled bool
Whether the condition is enabled or not. Defaults to true.
- Entities []int
The instance IDs associated with this condition.
- Entity
Guid string The unique entity identifier of the condition in New Relic.
- Gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- Metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- Name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- Policy
Id int The ID of the policy where this condition should be used.
- Runbook
Url string Runbook URL to display in notifications.
- Terms
[]Alert
Condition Term Args A list of terms for this condition. See Terms below for details.
- Type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- User
Defined stringMetric A custom metric to be evaluated.
- User
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- Violation
Close intTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- condition
Scope String application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled Boolean
Whether the condition is enabled or not. Defaults to true.
- entities List<Integer>
The instance IDs associated with this condition.
- entity
Guid String The unique entity identifier of the condition in New Relic.
- gc
Metric String A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- metric String
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- name String
The title of the condition. Must be between 1 and 64 characters, inclusive.
- policy
Id Integer The ID of the policy where this condition should be used.
- runbook
Url String Runbook URL to display in notifications.
- terms
List<Alert
Condition Term> A list of terms for this condition. See Terms below for details.
- type String
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- user
Defined StringMetric A custom metric to be evaluated.
- user
Defined StringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close IntegerTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- condition
Scope string application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled boolean
Whether the condition is enabled or not. Defaults to true.
- entities number[]
The instance IDs associated with this condition.
- entity
Guid string The unique entity identifier of the condition in New Relic.
- gc
Metric string A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- metric string
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- name string
The title of the condition. Must be between 1 and 64 characters, inclusive.
- policy
Id number The ID of the policy where this condition should be used.
- runbook
Url string Runbook URL to display in notifications.
- terms
Alert
Condition Term[] A list of terms for this condition. See Terms below for details.
- type string
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- user
Defined stringMetric A custom metric to be evaluated.
- user
Defined stringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close numberTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- condition_
scope str application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled bool
Whether the condition is enabled or not. Defaults to true.
- entities Sequence[int]
The instance IDs associated with this condition.
- entity_
guid str The unique entity identifier of the condition in New Relic.
- gc_
metric str A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- metric str
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- name str
The title of the condition. Must be between 1 and 64 characters, inclusive.
- policy_
id int The ID of the policy where this condition should be used.
- runbook_
url str Runbook URL to display in notifications.
- terms
Sequence[Alert
Condition Term Args] A list of terms for this condition. See Terms below for details.
- type str
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- user_
defined_ strmetric A custom metric to be evaluated.
- user_
defined_ strvalue_ function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation_
close_ inttimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
- condition
Scope String application
orinstance
. Chooseapplication
for most scenarios. If you are using the JVM plugin in New Relic, theinstance
setting allows your condition to trigger for specific app instances.- enabled Boolean
Whether the condition is enabled or not. Defaults to true.
- entities List<Number>
The instance IDs associated with this condition.
- entity
Guid String The unique entity identifier of the condition in New Relic.
- gc
Metric String A valid Garbage Collection metric e.g.
GC/G1 Young Generation
.- metric String
The metric field accepts parameters based on the
type
set. One of these metrics based ontype
:- name String
The title of the condition. Must be between 1 and 64 characters, inclusive.
- policy
Id Number The ID of the policy where this condition should be used.
- runbook
Url String Runbook URL to display in notifications.
- terms List<Property Map>
A list of terms for this condition. See Terms below for details.
- type String
The type of condition. One of:
apm_app_metric
,apm_jvm_metric
,apm_kt_metric
,browser_metric
,mobile_metric
- user
Defined StringMetric A custom metric to be evaluated.
- user
Defined StringValue Function One of:
average
,min
,max
,total
,sample_size
,rate
orpercent
.NOTE: The
user_defined_value_function
can haverate
orpercent
only when thetype
ismobile_metric
.import * as pulumi from "@pulumi/pulumi";
import pulumi
using System.Collections.Generic; using System.Linq; using Pulumi;
return await Deployment.RunAsync(() => { });
package main import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) func main() { pulumi.Run(func(ctx *pulumi.Context) error { return nil }) }
package generated_program; import com.pulumi.Context; import com.pulumi.Pulumi; import com.pulumi.core.Output; 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) { } }
{}
- violation
Close NumberTimer Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
- when
type
=apm_app_metric
andcondition_scope
=instance
- when
type
=apm_jvm_metric
- when
Supporting Types
AlertConditionTerm, AlertConditionTermArgs
- Duration int
- Threshold double
- Time
Function string - Operator string
- Priority string
- Duration int
- Threshold float64
- Time
Function string - Operator string
- Priority string
- duration Integer
- threshold Double
- time
Function String - operator String
- priority String
- duration number
- threshold number
- time
Function string - operator string
- priority string
- duration int
- threshold float
- time_
function str - operator str
- priority str
- duration Number
- threshold Number
- time
Function String - operator String
- priority String
Import
Alert conditions can be imported using notation alert_policy_id:alert_condition_id
, e.g.
$ pulumi import newrelic:index/alertCondition:AlertCondition main 123456:6789012345
Package Details
- Repository
- New Relic pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
newrelic
Terraform Provider.