Monitor
Use this resource to create, update, and delete a synthetics monitor in New Relic.
Additional Examples
Type: BROWSER
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Monitor("foo", {
bypassHeadRequest: true, // Note: optional for type "BROWSER" only
frequency: 5,
locations: ["AWS_US_EAST_1"],
status: "ENABLED",
treatRedirectAsFailure: true, // Note: optional for type "BROWSER" only
type: "BROWSER",
uri: "https://example.com", // required for type "SIMPLE" and "BROWSER"
validationString: "add example validation check here", // optional for type "SIMPLE" and "BROWSER"
verifySsl: true, // optional for type "SIMPLE" and "BROWSER"
});import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.Monitor("foo",
bypass_head_request=True,
frequency=5,
locations=["AWS_US_EAST_1"],
status="ENABLED",
treat_redirect_as_failure=True,
type="BROWSER",
uri="https://example.com",
validation_string="add example validation check here",
verify_ssl=True)
# optional for type "SIMPLE" and "BROWSER"using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
BypassHeadRequest = true,
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
},
Status = "ENABLED",
TreatRedirectAsFailure = true,
Type = "BROWSER",
Uri = "https://example.com",
ValidationString = "add example validation check here",
VerifySsl = true,
});
// optional for type "SIMPLE" and "BROWSER"
}
}
Type: SCRIPT_BROWSER
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Monitor("foo", {
frequency: 5,
locations: ["AWS_US_EAST_1"],
status: "ENABLED",
type: "SCRIPT_BROWSER",
});import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.Monitor("foo",
frequency=5,
locations=["AWS_US_EAST_1"],
status="ENABLED",
type="SCRIPT_BROWSER")using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
},
Status = "ENABLED",
Type = "SCRIPT_BROWSER",
});
}
}
Type: SCRIPT_API
import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Monitor("foo", {
frequency: 5,
locations: ["AWS_US_EAST_1"],
status: "ENABLED",
type: "SCRIPT_API",
});import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.Monitor("foo",
frequency=5,
locations=["AWS_US_EAST_1"],
status="ENABLED",
type="SCRIPT_API")using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
},
Status = "ENABLED",
Type = "SCRIPT_API",
});
}
}
Example Usage
using Pulumi;
using NewRelic = Pulumi.NewRelic;
class MyStack : Stack
{
public MyStack()
{
var foo = new NewRelic.Synthetics.Monitor("foo", new NewRelic.Synthetics.MonitorArgs
{
Frequency = 5,
Locations =
{
"AWS_US_EAST_1",
"AWS_US_EAST_2",
},
Status = "ENABLED",
Type = "SIMPLE",
Uri = "https://example.com",
ValidationString = "add example validation check here",
VerifySsl = true,
});
// Optional for type "SIMPLE" and "BROWSER"
}
}
Coming soon!
import pulumi
import pulumi_newrelic as newrelic
foo = newrelic.synthetics.Monitor("foo",
frequency=5,
locations=[
"AWS_US_EAST_1",
"AWS_US_EAST_2",
],
status="ENABLED",
type="SIMPLE",
uri="https://example.com",
validation_string="add example validation check here",
verify_ssl=True)
# Optional for type "SIMPLE" and "BROWSER"import * as pulumi from "@pulumi/pulumi";
import * as newrelic from "@pulumi/newrelic";
const foo = new newrelic.synthetics.Monitor("foo", {
frequency: 5,
locations: [
"AWS_US_EAST_1",
"AWS_US_EAST_2",
],
status: "ENABLED",
type: "SIMPLE",
uri: "https://example.com", // Required for type "SIMPLE" and "BROWSER"
validationString: "add example validation check here", // Optional for type "SIMPLE" and "BROWSER"
verifySsl: true, // Optional for type "SIMPLE" and "BROWSER"
});Create a Monitor Resource
new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);def Monitor(resource_name, opts=None, bypass_head_request=None, frequency=None, locations=None, name=None, sla_threshold=None, status=None, treat_redirect_as_failure=None, type=None, uri=None, validation_string=None, verify_ssl=None, __props__=None);func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args MonitorArgs
- 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 MonitorArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MonitorArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
Monitor Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The Monitor resource accepts the following input properties:
- Frequency int
The interval (in minutes) at which this monitor should run.
- Locations List<string>
The locations in which this monitor should be run.
- Status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- Type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- Bypass
Head boolRequest Bypass HEAD request.
- Name string
The title of this monitor.
- Sla
Threshold double The base threshold for the SLA report.
- Treat
Redirect boolAs Failure Fail the monitor check if redirected.
- Uri string
The URI for the monitor to hit.
- Validation
String string The string to validate against in the response.
- Verify
Ssl bool Verify SSL.
- Frequency int
The interval (in minutes) at which this monitor should run.
- Locations []string
The locations in which this monitor should be run.
- Status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- Type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- Bypass
Head boolRequest Bypass HEAD request.
- Name string
The title of this monitor.
- Sla
Threshold float64 The base threshold for the SLA report.
- Treat
Redirect boolAs Failure Fail the monitor check if redirected.
- Uri string
The URI for the monitor to hit.
- Validation
String string The string to validate against in the response.
- Verify
Ssl bool Verify SSL.
- frequency number
The interval (in minutes) at which this monitor should run.
- locations string[]
The locations in which this monitor should be run.
- status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- bypass
Head booleanRequest Bypass HEAD request.
- name string
The title of this monitor.
- sla
Threshold number The base threshold for the SLA report.
- treat
Redirect booleanAs Failure Fail the monitor check if redirected.
- uri string
The URI for the monitor to hit.
- validation
String string The string to validate against in the response.
- verify
Ssl boolean Verify SSL.
- frequency float
The interval (in minutes) at which this monitor should run.
- locations List[str]
The locations in which this monitor should be run.
- status str
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- type str
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- bypass_
head_ boolrequest Bypass HEAD request.
- name str
The title of this monitor.
- sla_
threshold float The base threshold for the SLA report.
- treat_
redirect_ boolas_ failure Fail the monitor check if redirected.
- uri str
The URI for the monitor to hit.
- validation_
string str The string to validate against in the response.
- verify_
ssl bool Verify SSL.
Outputs
All input properties are implicitly available as output properties. Additionally, the Monitor resource produces the following output properties:
Look up an Existing Monitor Resource
Get an existing Monitor 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?: MonitorState, opts?: CustomResourceOptions): Monitorstatic get(resource_name, id, opts=None, bypass_head_request=None, frequency=None, locations=None, name=None, sla_threshold=None, status=None, treat_redirect_as_failure=None, type=None, uri=None, validation_string=None, verify_ssl=None, __props__=None);func GetMonitor(ctx *Context, name string, id IDInput, state *MonitorState, opts ...ResourceOption) (*Monitor, error)public static Monitor Get(string name, Input<string> id, MonitorState? 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:
- Bypass
Head boolRequest Bypass HEAD request.
- Frequency int
The interval (in minutes) at which this monitor should run.
- Locations List<string>
The locations in which this monitor should be run.
- Name string
The title of this monitor.
- Sla
Threshold double The base threshold for the SLA report.
- Status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- Treat
Redirect boolAs Failure Fail the monitor check if redirected.
- Type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- Uri string
The URI for the monitor to hit.
- Validation
String string The string to validate against in the response.
- Verify
Ssl bool Verify SSL.
- Bypass
Head boolRequest Bypass HEAD request.
- Frequency int
The interval (in minutes) at which this monitor should run.
- Locations []string
The locations in which this monitor should be run.
- Name string
The title of this monitor.
- Sla
Threshold float64 The base threshold for the SLA report.
- Status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- Treat
Redirect boolAs Failure Fail the monitor check if redirected.
- Type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- Uri string
The URI for the monitor to hit.
- Validation
String string The string to validate against in the response.
- Verify
Ssl bool Verify SSL.
- bypass
Head booleanRequest Bypass HEAD request.
- frequency number
The interval (in minutes) at which this monitor should run.
- locations string[]
The locations in which this monitor should be run.
- name string
The title of this monitor.
- sla
Threshold number The base threshold for the SLA report.
- status string
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- treat
Redirect booleanAs Failure Fail the monitor check if redirected.
- type string
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- uri string
The URI for the monitor to hit.
- validation
String string The string to validate against in the response.
- verify
Ssl boolean Verify SSL.
- bypass_
head_ boolrequest Bypass HEAD request.
- frequency float
The interval (in minutes) at which this monitor should run.
- locations List[str]
The locations in which this monitor should be run.
- name str
The title of this monitor.
- sla_
threshold float The base threshold for the SLA report.
- status str
The monitor status (i.e.
ENABLED,MUTED,DISABLED).- treat_
redirect_ boolas_ failure Fail the monitor check if redirected.
- type str
The monitor type. Valid values are
SIMPLE,BROWSER,SCRIPT_BROWSER, andSCRIPT_API.- uri str
The URI for the monitor to hit.
- validation_
string str The string to validate against in the response.
- verify_
ssl bool Verify SSL.
Package Details
- Repository
- https://github.com/pulumi/pulumi-newrelic
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
newrelicTerraform Provider.