Show / Hide Table of Contents

Class Monitor

Use this resource to create, update, and delete a synthetics monitor in New Relic.

Example Usage

Type: SIMPLE

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"
}

}

Additional Examples

Type: 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

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

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
Monitor
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.NewRelic.Synthetics
Assembly: Pulumi.NewRelic.dll
Syntax
public class Monitor : CustomResource

Constructors

View Source

Monitor(String, MonitorArgs, CustomResourceOptions)

Create a Monitor resource with the given unique name, arguments, and options.

Declaration
public Monitor(string name, MonitorArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

MonitorArgs args

The arguments used to populate this resource's properties

CustomResourceOptions options

A bag of options that control this resource's behavior

Properties

View Source

BypassHeadRequest

Bypass HEAD request.

Declaration
public Output<bool?> BypassHeadRequest { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Frequency

The interval (in minutes) at which this monitor should run.

Declaration
public Output<int> Frequency { get; }
Property Value
Type Description
Output<System.Int32>
View Source

Locations

The locations in which this monitor should be run.

Declaration
public Output<ImmutableArray<string>> Locations { get; }
Property Value
Type Description
Output<System.Collections.Immutable.ImmutableArray<System.String>>
View Source

Name

The title of this monitor.

Declaration
public Output<string> Name { get; }
Property Value
Type Description
Output<System.String>
View Source

SlaThreshold

The base threshold for the SLA report.

Declaration
public Output<double?> SlaThreshold { get; }
Property Value
Type Description
Output<System.Nullable<System.Double>>
View Source

Status

The monitor status (i.e. ENABLED, MUTED, DISABLED).

Declaration
public Output<string> Status { get; }
Property Value
Type Description
Output<System.String>
View Source

TreatRedirectAsFailure

Fail the monitor check if redirected.

Declaration
public Output<bool?> TreatRedirectAsFailure { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>
View Source

Type

The monitor type. Valid values are SIMPLE, BROWSER, SCRIPT_BROWSER, and SCRIPT_API.

Declaration
public Output<string> Type { get; }
Property Value
Type Description
Output<System.String>
View Source

Uri

The URI for the monitor to hit.

Declaration
public Output<string> Uri { get; }
Property Value
Type Description
Output<System.String>
View Source

ValidationString

The string to validate against in the response.

Declaration
public Output<string> ValidationString { get; }
Property Value
Type Description
Output<System.String>
View Source

VerifySsl

Verify SSL.

Declaration
public Output<bool?> VerifySsl { get; }
Property Value
Type Description
Output<System.Nullable<System.Boolean>>

Methods

View Source

Get(String, Input<String>, MonitorState, CustomResourceOptions)

Get an existing Monitor resource's state with the given name, ID, and optional extra properties used to qualify the lookup.

Declaration
public static Monitor Get(string name, Input<string> id, MonitorState state = null, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resulting resource.

Input<System.String> id

The unique provider ID of the resource to lookup.

MonitorState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Monitor
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.