1. Packages
  2. Chronosphere
  3. API Docs
  4. Monitor
Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere

chronosphere.Monitor

Explore with Pulumi AI

chronosphere logo
Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere

    Create Monitor Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Monitor(name: string, args: MonitorArgs, opts?: CustomResourceOptions);
    @overload
    def Monitor(resource_name: str,
                args: MonitorArgs,
                opts: Optional[ResourceOptions] = None)
    
    @overload
    def Monitor(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                name: Optional[str] = None,
                query: Optional[MonitorQueryArgs] = None,
                series_conditions: Optional[MonitorSeriesConditionsArgs] = None,
                annotations: Optional[Mapping[str, str]] = None,
                bucket_id: Optional[str] = None,
                collection_id: Optional[str] = None,
                interval: Optional[str] = None,
                labels: Optional[Mapping[str, str]] = None,
                notification_policy_id: Optional[str] = None,
                schedule: Optional[MonitorScheduleArgs] = None,
                signal_grouping: Optional[MonitorSignalGroupingArgs] = None,
                slug: Optional[str] = None)
    func NewMonitor(ctx *Context, name string, args MonitorArgs, opts ...ResourceOption) (*Monitor, error)
    public Monitor(string name, MonitorArgs args, CustomResourceOptions? opts = null)
    public Monitor(String name, MonitorArgs args)
    public Monitor(String name, MonitorArgs args, CustomResourceOptions options)
    
    type: chronosphere:Monitor
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    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.
    args MonitorArgs
    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 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.
    name String
    The unique name of the resource.
    args MonitorArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var monitorResource = new Pulumi.Monitor("monitorResource", new()
    {
        Name = "string",
        Query = new Pulumi.Inputs.MonitorQueryArgs
        {
            GraphiteExpr = "string",
            PrometheusExpr = "string",
        },
        SeriesConditions = new Pulumi.Inputs.MonitorSeriesConditionsArgs
        {
            Conditions = new[]
            {
                new Pulumi.Inputs.MonitorSeriesConditionsConditionArgs
                {
                    Op = "string",
                    Severity = "string",
                    ResolveSustain = "string",
                    Sustain = "string",
                    Value = 0,
                },
            },
            Overrides = new[]
            {
                new Pulumi.Inputs.MonitorSeriesConditionsOverrideArgs
                {
                    Conditions = new[]
                    {
                        new Pulumi.Inputs.MonitorSeriesConditionsOverrideConditionArgs
                        {
                            Op = "string",
                            Severity = "string",
                            ResolveSustain = "string",
                            Sustain = "string",
                            Value = 0,
                        },
                    },
                    LabelMatchers = new[]
                    {
                        new Pulumi.Inputs.MonitorSeriesConditionsOverrideLabelMatcherArgs
                        {
                            Name = "string",
                            Type = "string",
                            Value = "string",
                        },
                    },
                },
            },
        },
        Annotations = 
        {
            { "string", "string" },
        },
        BucketId = "string",
        CollectionId = "string",
        Interval = "string",
        Labels = 
        {
            { "string", "string" },
        },
        NotificationPolicyId = "string",
        Schedule = new Pulumi.Inputs.MonitorScheduleArgs
        {
            Timezone = "string",
            Ranges = new[]
            {
                new Pulumi.Inputs.MonitorScheduleRangeArgs
                {
                    Day = "string",
                    End = "string",
                    Start = "string",
                },
            },
        },
        SignalGrouping = new Pulumi.Inputs.MonitorSignalGroupingArgs
        {
            LabelNames = new[]
            {
                "string",
            },
            SignalPerSeries = false,
        },
        Slug = "string",
    });
    
    example, err := chronosphere.NewMonitor(ctx, "monitorResource", &chronosphere.MonitorArgs{
    	Name: pulumi.String("string"),
    	Query: &chronosphere.MonitorQueryArgs{
    		GraphiteExpr:   pulumi.String("string"),
    		PrometheusExpr: pulumi.String("string"),
    	},
    	SeriesConditions: &chronosphere.MonitorSeriesConditionsArgs{
    		Conditions: chronosphere.MonitorSeriesConditionsConditionArray{
    			&chronosphere.MonitorSeriesConditionsConditionArgs{
    				Op:             pulumi.String("string"),
    				Severity:       pulumi.String("string"),
    				ResolveSustain: pulumi.String("string"),
    				Sustain:        pulumi.String("string"),
    				Value:          pulumi.Float64(0),
    			},
    		},
    		Overrides: chronosphere.MonitorSeriesConditionsOverrideArray{
    			&chronosphere.MonitorSeriesConditionsOverrideArgs{
    				Conditions: chronosphere.MonitorSeriesConditionsOverrideConditionArray{
    					&chronosphere.MonitorSeriesConditionsOverrideConditionArgs{
    						Op:             pulumi.String("string"),
    						Severity:       pulumi.String("string"),
    						ResolveSustain: pulumi.String("string"),
    						Sustain:        pulumi.String("string"),
    						Value:          pulumi.Float64(0),
    					},
    				},
    				LabelMatchers: chronosphere.MonitorSeriesConditionsOverrideLabelMatcherArray{
    					&chronosphere.MonitorSeriesConditionsOverrideLabelMatcherArgs{
    						Name:  pulumi.String("string"),
    						Type:  pulumi.String("string"),
    						Value: pulumi.String("string"),
    					},
    				},
    			},
    		},
    	},
    	Annotations: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	BucketId:     pulumi.String("string"),
    	CollectionId: pulumi.String("string"),
    	Interval:     pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	NotificationPolicyId: pulumi.String("string"),
    	Schedule: &chronosphere.MonitorScheduleArgs{
    		Timezone: pulumi.String("string"),
    		Ranges: chronosphere.MonitorScheduleRangeArray{
    			&chronosphere.MonitorScheduleRangeArgs{
    				Day:   pulumi.String("string"),
    				End:   pulumi.String("string"),
    				Start: pulumi.String("string"),
    			},
    		},
    	},
    	SignalGrouping: &chronosphere.MonitorSignalGroupingArgs{
    		LabelNames: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		SignalPerSeries: pulumi.Bool(false),
    	},
    	Slug: pulumi.String("string"),
    })
    
    var monitorResource = new Monitor("monitorResource", MonitorArgs.builder()
        .name("string")
        .query(MonitorQueryArgs.builder()
            .graphiteExpr("string")
            .prometheusExpr("string")
            .build())
        .seriesConditions(MonitorSeriesConditionsArgs.builder()
            .conditions(MonitorSeriesConditionsConditionArgs.builder()
                .op("string")
                .severity("string")
                .resolveSustain("string")
                .sustain("string")
                .value(0)
                .build())
            .overrides(MonitorSeriesConditionsOverrideArgs.builder()
                .conditions(MonitorSeriesConditionsOverrideConditionArgs.builder()
                    .op("string")
                    .severity("string")
                    .resolveSustain("string")
                    .sustain("string")
                    .value(0)
                    .build())
                .labelMatchers(MonitorSeriesConditionsOverrideLabelMatcherArgs.builder()
                    .name("string")
                    .type("string")
                    .value("string")
                    .build())
                .build())
            .build())
        .annotations(Map.of("string", "string"))
        .bucketId("string")
        .collectionId("string")
        .interval("string")
        .labels(Map.of("string", "string"))
        .notificationPolicyId("string")
        .schedule(MonitorScheduleArgs.builder()
            .timezone("string")
            .ranges(MonitorScheduleRangeArgs.builder()
                .day("string")
                .end("string")
                .start("string")
                .build())
            .build())
        .signalGrouping(MonitorSignalGroupingArgs.builder()
            .labelNames("string")
            .signalPerSeries(false)
            .build())
        .slug("string")
        .build());
    
    monitor_resource = chronosphere.Monitor("monitorResource",
        name="string",
        query={
            "graphite_expr": "string",
            "prometheus_expr": "string",
        },
        series_conditions={
            "conditions": [{
                "op": "string",
                "severity": "string",
                "resolve_sustain": "string",
                "sustain": "string",
                "value": 0,
            }],
            "overrides": [{
                "conditions": [{
                    "op": "string",
                    "severity": "string",
                    "resolve_sustain": "string",
                    "sustain": "string",
                    "value": 0,
                }],
                "label_matchers": [{
                    "name": "string",
                    "type": "string",
                    "value": "string",
                }],
            }],
        },
        annotations={
            "string": "string",
        },
        bucket_id="string",
        collection_id="string",
        interval="string",
        labels={
            "string": "string",
        },
        notification_policy_id="string",
        schedule={
            "timezone": "string",
            "ranges": [{
                "day": "string",
                "end": "string",
                "start": "string",
            }],
        },
        signal_grouping={
            "label_names": ["string"],
            "signal_per_series": False,
        },
        slug="string")
    
    const monitorResource = new chronosphere.Monitor("monitorResource", {
        name: "string",
        query: {
            graphiteExpr: "string",
            prometheusExpr: "string",
        },
        seriesConditions: {
            conditions: [{
                op: "string",
                severity: "string",
                resolveSustain: "string",
                sustain: "string",
                value: 0,
            }],
            overrides: [{
                conditions: [{
                    op: "string",
                    severity: "string",
                    resolveSustain: "string",
                    sustain: "string",
                    value: 0,
                }],
                labelMatchers: [{
                    name: "string",
                    type: "string",
                    value: "string",
                }],
            }],
        },
        annotations: {
            string: "string",
        },
        bucketId: "string",
        collectionId: "string",
        interval: "string",
        labels: {
            string: "string",
        },
        notificationPolicyId: "string",
        schedule: {
            timezone: "string",
            ranges: [{
                day: "string",
                end: "string",
                start: "string",
            }],
        },
        signalGrouping: {
            labelNames: ["string"],
            signalPerSeries: false,
        },
        slug: "string",
    });
    
    type: chronosphere:Monitor
    properties:
        annotations:
            string: string
        bucketId: string
        collectionId: string
        interval: string
        labels:
            string: string
        name: string
        notificationPolicyId: string
        query:
            graphiteExpr: string
            prometheusExpr: string
        schedule:
            ranges:
                - day: string
                  end: string
                  start: string
            timezone: string
        seriesConditions:
            conditions:
                - op: string
                  resolveSustain: string
                  severity: string
                  sustain: string
                  value: 0
            overrides:
                - conditions:
                    - op: string
                      resolveSustain: string
                      severity: string
                      sustain: string
                      value: 0
                  labelMatchers:
                    - name: string
                      type: string
                      value: string
        signalGrouping:
            labelNames:
                - string
            signalPerSeries: false
        slug: string
    

    Monitor Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The Monitor resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Monitor resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up 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): Monitor
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            annotations: Optional[Mapping[str, str]] = None,
            bucket_id: Optional[str] = None,
            collection_id: Optional[str] = None,
            interval: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            notification_policy_id: Optional[str] = None,
            query: Optional[MonitorQueryArgs] = None,
            schedule: Optional[MonitorScheduleArgs] = None,
            series_conditions: Optional[MonitorSeriesConditionsArgs] = None,
            signal_grouping: Optional[MonitorSignalGroupingArgs] = None,
            slug: Optional[str] = None) -> Monitor
    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)
    public static Monitor get(String name, Output<String> id, MonitorState 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.
    The following state arguments are supported:

    Supporting Types

    MonitorQuery, MonitorQueryArgs

    MonitorSchedule, MonitorScheduleArgs

    MonitorScheduleRange, MonitorScheduleRangeArgs

    Day string
    End string
    Start string
    Day string
    End string
    Start string
    day String
    end String
    start String
    day string
    end string
    start string
    day str
    end str
    start str
    day String
    end String
    start String

    MonitorSeriesConditions, MonitorSeriesConditionsArgs

    MonitorSeriesConditionsCondition, MonitorSeriesConditionsConditionArgs

    Op string
    Severity string
    ResolveSustain string
    Sustain string
    Value double
    Op string
    Severity string
    ResolveSustain string
    Sustain string
    Value float64
    op String
    severity String
    resolveSustain String
    sustain String
    value Double
    op string
    severity string
    resolveSustain string
    sustain string
    value number
    op String
    severity String
    resolveSustain String
    sustain String
    value Number

    MonitorSeriesConditionsOverride, MonitorSeriesConditionsOverrideArgs

    MonitorSeriesConditionsOverrideCondition, MonitorSeriesConditionsOverrideConditionArgs

    Op string
    Severity string
    ResolveSustain string
    Sustain string
    Value double
    Op string
    Severity string
    ResolveSustain string
    Sustain string
    Value float64
    op String
    severity String
    resolveSustain String
    sustain String
    value Double
    op string
    severity string
    resolveSustain string
    sustain string
    value number
    op String
    severity String
    resolveSustain String
    sustain String
    value Number

    MonitorSeriesConditionsOverrideLabelMatcher, MonitorSeriesConditionsOverrideLabelMatcherArgs

    Name string
    Type string
    Value string
    Name string
    Type string
    Value string
    name String
    type String
    value String
    name string
    type string
    value string
    name str
    type str
    value str
    name String
    type String
    value String

    MonitorSignalGrouping, MonitorSignalGroupingArgs

    LabelNames List<string>
    SignalPerSeries bool
    labelNames List<String>
    signalPerSeries Boolean
    labelNames string[]
    signalPerSeries boolean
    label_names Sequence[str]
    signal_per_series bool
    labelNames List<String>
    signalPerSeries Boolean

    Package Details

    Repository
    chronosphere chronosphereio/pulumi-chronosphere
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the chronosphere Terraform Provider.
    chronosphere logo
    Chronosphere v0.9.3 published on Tuesday, Oct 8, 2024 by Chronosphere