1. Packages
  2. SignalFx
  3. API Docs
  4. MetricRuleset
SignalFx v7.1.3 published on Wednesday, Apr 24, 2024 by Pulumi

signalfx.MetricRuleset

Explore with Pulumi AI

signalfx logo
SignalFx v7.1.3 published on Wednesday, Apr 24, 2024 by Pulumi

    Provides an Observability Cloud resource for managing metric rulesets.

    NOTE When managing metric rulesets to drop data use a session token for an administrator to authenticate the Splunk Observability Cloud provider. See Operations that require a session token for an administrator. Otherwise you’ll receive a 4xx error.

    Example

    resource "signalfx_metric_ruleset" "cpu_utilization_metric_ruleset" {
        metric_name = "cpu.utilization"
    
        aggregation_rules {
            name = "cpu.utilization by service rule"
            enabled = true
            matcher {
                type = "dimension"
                filters {
                    property = "realm"
                    property_value = [ "us-east-1" ]
                    not = false
                }
            }
            aggregator {
                type = "rollup"
                dimensions = [ "service" ]
                drop_dimensions = false
                output_name = "cpu.utilization.by.service.agg"
            }
        }
    
        routing_rule {
            destination = "RealTime"
        }
    }
    

    Arguments

    The following arguments are supported in the resource block:

    • metric_name - (Required) Name of the input metric
    • aggregation_rules - (Optional) List of aggregation rules for the metric
      • enabled - (Required) When false, this rule will not generate aggregated MTSs
      • name - (Optional) name of the aggregation rule
      • matcher - (Required) Matcher object
        • type - (Required) Type of matcher. Must always be “dimension”
        • filters - (Optional) List of filters to filter the set of input MTSs
          • property - (Required) - Name of the dimension
          • property_value - (Required) - Value of the dimension
          • not - When true, this filter will match all values not matching the property_values
      • aggregator - (Required) - Aggregator object
        • type - (Required) Type of aggregator. Must always be “rollup”
        • dimensions - (Required) List of dimensions to either be kept or dropped in the new aggregated MTSs
        • drop_dimensions - (Required) when true, the specified dimensions will be dropped from the aggregated MTSs
        • output_name - (Required) name of the new aggregated metric
    • routing_rule - (Required) Routing Rule object
      • destination - (Required) - end destination of the input metric. Must be RealTime or Drop

    Create MetricRuleset Resource

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

    Constructor syntax

    new MetricRuleset(name: string, args: MetricRulesetArgs, opts?: CustomResourceOptions);
    @overload
    def MetricRuleset(resource_name: str,
                      args: MetricRulesetArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricRuleset(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      metric_name: Optional[str] = None,
                      routing_rules: Optional[Sequence[MetricRulesetRoutingRuleArgs]] = None,
                      aggregation_rules: Optional[Sequence[MetricRulesetAggregationRuleArgs]] = None)
    func NewMetricRuleset(ctx *Context, name string, args MetricRulesetArgs, opts ...ResourceOption) (*MetricRuleset, error)
    public MetricRuleset(string name, MetricRulesetArgs args, CustomResourceOptions? opts = null)
    public MetricRuleset(String name, MetricRulesetArgs args)
    public MetricRuleset(String name, MetricRulesetArgs args, CustomResourceOptions options)
    
    type: signalfx:MetricRuleset
    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 MetricRulesetArgs
    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 MetricRulesetArgs
    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 MetricRulesetArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricRulesetArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricRulesetArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var metricRulesetResource = new SignalFx.MetricRuleset("metricRulesetResource", new()
    {
        MetricName = "string",
        RoutingRules = new[]
        {
            new SignalFx.Inputs.MetricRulesetRoutingRuleArgs
            {
                Destination = "string",
            },
        },
        AggregationRules = new[]
        {
            new SignalFx.Inputs.MetricRulesetAggregationRuleArgs
            {
                Aggregators = new[]
                {
                    new SignalFx.Inputs.MetricRulesetAggregationRuleAggregatorArgs
                    {
                        Dimensions = new[]
                        {
                            "string",
                        },
                        DropDimensions = false,
                        OutputName = "string",
                        Type = "string",
                    },
                },
                Enabled = false,
                Matchers = new[]
                {
                    new SignalFx.Inputs.MetricRulesetAggregationRuleMatcherArgs
                    {
                        Type = "string",
                        Filters = new[]
                        {
                            new SignalFx.Inputs.MetricRulesetAggregationRuleMatcherFilterArgs
                            {
                                Not = false,
                                Property = "string",
                                PropertyValues = new[]
                                {
                                    "string",
                                },
                            },
                        },
                    },
                },
                Name = "string",
            },
        },
    });
    
    example, err := signalfx.NewMetricRuleset(ctx, "metricRulesetResource", &signalfx.MetricRulesetArgs{
    	MetricName: pulumi.String("string"),
    	RoutingRules: signalfx.MetricRulesetRoutingRuleArray{
    		&signalfx.MetricRulesetRoutingRuleArgs{
    			Destination: pulumi.String("string"),
    		},
    	},
    	AggregationRules: signalfx.MetricRulesetAggregationRuleArray{
    		&signalfx.MetricRulesetAggregationRuleArgs{
    			Aggregators: signalfx.MetricRulesetAggregationRuleAggregatorArray{
    				&signalfx.MetricRulesetAggregationRuleAggregatorArgs{
    					Dimensions: pulumi.StringArray{
    						pulumi.String("string"),
    					},
    					DropDimensions: pulumi.Bool(false),
    					OutputName:     pulumi.String("string"),
    					Type:           pulumi.String("string"),
    				},
    			},
    			Enabled: pulumi.Bool(false),
    			Matchers: signalfx.MetricRulesetAggregationRuleMatcherArray{
    				&signalfx.MetricRulesetAggregationRuleMatcherArgs{
    					Type: pulumi.String("string"),
    					Filters: signalfx.MetricRulesetAggregationRuleMatcherFilterArray{
    						&signalfx.MetricRulesetAggregationRuleMatcherFilterArgs{
    							Not:      pulumi.Bool(false),
    							Property: pulumi.String("string"),
    							PropertyValues: pulumi.StringArray{
    								pulumi.String("string"),
    							},
    						},
    					},
    				},
    			},
    			Name: pulumi.String("string"),
    		},
    	},
    })
    
    var metricRulesetResource = new MetricRuleset("metricRulesetResource", MetricRulesetArgs.builder()        
        .metricName("string")
        .routingRules(MetricRulesetRoutingRuleArgs.builder()
            .destination("string")
            .build())
        .aggregationRules(MetricRulesetAggregationRuleArgs.builder()
            .aggregators(MetricRulesetAggregationRuleAggregatorArgs.builder()
                .dimensions("string")
                .dropDimensions(false)
                .outputName("string")
                .type("string")
                .build())
            .enabled(false)
            .matchers(MetricRulesetAggregationRuleMatcherArgs.builder()
                .type("string")
                .filters(MetricRulesetAggregationRuleMatcherFilterArgs.builder()
                    .not(false)
                    .property("string")
                    .propertyValues("string")
                    .build())
                .build())
            .name("string")
            .build())
        .build());
    
    metric_ruleset_resource = signalfx.MetricRuleset("metricRulesetResource",
        metric_name="string",
        routing_rules=[signalfx.MetricRulesetRoutingRuleArgs(
            destination="string",
        )],
        aggregation_rules=[signalfx.MetricRulesetAggregationRuleArgs(
            aggregators=[signalfx.MetricRulesetAggregationRuleAggregatorArgs(
                dimensions=["string"],
                drop_dimensions=False,
                output_name="string",
                type="string",
            )],
            enabled=False,
            matchers=[signalfx.MetricRulesetAggregationRuleMatcherArgs(
                type="string",
                filters=[signalfx.MetricRulesetAggregationRuleMatcherFilterArgs(
                    not_=False,
                    property="string",
                    property_values=["string"],
                )],
            )],
            name="string",
        )])
    
    const metricRulesetResource = new signalfx.MetricRuleset("metricRulesetResource", {
        metricName: "string",
        routingRules: [{
            destination: "string",
        }],
        aggregationRules: [{
            aggregators: [{
                dimensions: ["string"],
                dropDimensions: false,
                outputName: "string",
                type: "string",
            }],
            enabled: false,
            matchers: [{
                type: "string",
                filters: [{
                    not: false,
                    property: "string",
                    propertyValues: ["string"],
                }],
            }],
            name: "string",
        }],
    });
    
    type: signalfx:MetricRuleset
    properties:
        aggregationRules:
            - aggregators:
                - dimensions:
                    - string
                  dropDimensions: false
                  outputName: string
                  type: string
              enabled: false
              matchers:
                - filters:
                    - not: false
                      property: string
                      propertyValues:
                        - string
                  type: string
              name: string
        metricName: string
        routingRules:
            - destination: string
    

    MetricRuleset 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 MetricRuleset resource accepts the following input properties:

    MetricName string
    Name of the metric
    RoutingRules []MetricRulesetRoutingRuleArgs
    Location to send the input metric
    AggregationRules []MetricRulesetAggregationRuleArgs
    Aggregation rules in the ruleset
    metricName String
    Name of the metric
    routingRules List<MetricRulesetRoutingRule>
    Location to send the input metric
    aggregationRules List<MetricRulesetAggregationRule>
    Aggregation rules in the ruleset
    metricName string
    Name of the metric
    routingRules MetricRulesetRoutingRule[]
    Location to send the input metric
    aggregationRules MetricRulesetAggregationRule[]
    Aggregation rules in the ruleset
    metric_name str
    Name of the metric
    routing_rules Sequence[MetricRulesetRoutingRuleArgs]
    Location to send the input metric
    aggregation_rules Sequence[MetricRulesetAggregationRuleArgs]
    Aggregation rules in the ruleset
    metricName String
    Name of the metric
    routingRules List<Property Map>
    Location to send the input metric
    aggregationRules List<Property Map>
    Aggregation rules in the ruleset

    Outputs

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

    Created string
    Timestamp of when the metric ruleset was created
    Creator string
    ID of the creator of the metric ruleset
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Timestamp of when the metric ruleset was last updated
    LastUpdatedBy string
    ID of user who last updated the metric ruleset
    LastUpdatedByName string
    Name of user who last updated this metric ruleset
    Version string
    Version of the ruleset
    Created string
    Timestamp of when the metric ruleset was created
    Creator string
    ID of the creator of the metric ruleset
    Id string
    The provider-assigned unique ID for this managed resource.
    LastUpdated string
    Timestamp of when the metric ruleset was last updated
    LastUpdatedBy string
    ID of user who last updated the metric ruleset
    LastUpdatedByName string
    Name of user who last updated this metric ruleset
    Version string
    Version of the ruleset
    created String
    Timestamp of when the metric ruleset was created
    creator String
    ID of the creator of the metric ruleset
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy String
    ID of user who last updated the metric ruleset
    lastUpdatedByName String
    Name of user who last updated this metric ruleset
    version String
    Version of the ruleset
    created string
    Timestamp of when the metric ruleset was created
    creator string
    ID of the creator of the metric ruleset
    id string
    The provider-assigned unique ID for this managed resource.
    lastUpdated string
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy string
    ID of user who last updated the metric ruleset
    lastUpdatedByName string
    Name of user who last updated this metric ruleset
    version string
    Version of the ruleset
    created str
    Timestamp of when the metric ruleset was created
    creator str
    ID of the creator of the metric ruleset
    id str
    The provider-assigned unique ID for this managed resource.
    last_updated str
    Timestamp of when the metric ruleset was last updated
    last_updated_by str
    ID of user who last updated the metric ruleset
    last_updated_by_name str
    Name of user who last updated this metric ruleset
    version str
    Version of the ruleset
    created String
    Timestamp of when the metric ruleset was created
    creator String
    ID of the creator of the metric ruleset
    id String
    The provider-assigned unique ID for this managed resource.
    lastUpdated String
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy String
    ID of user who last updated the metric ruleset
    lastUpdatedByName String
    Name of user who last updated this metric ruleset
    version String
    Version of the ruleset

    Look up Existing MetricRuleset Resource

    Get an existing MetricRuleset 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?: MetricRulesetState, opts?: CustomResourceOptions): MetricRuleset
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            aggregation_rules: Optional[Sequence[MetricRulesetAggregationRuleArgs]] = None,
            created: Optional[str] = None,
            creator: Optional[str] = None,
            last_updated: Optional[str] = None,
            last_updated_by: Optional[str] = None,
            last_updated_by_name: Optional[str] = None,
            metric_name: Optional[str] = None,
            routing_rules: Optional[Sequence[MetricRulesetRoutingRuleArgs]] = None,
            version: Optional[str] = None) -> MetricRuleset
    func GetMetricRuleset(ctx *Context, name string, id IDInput, state *MetricRulesetState, opts ...ResourceOption) (*MetricRuleset, error)
    public static MetricRuleset Get(string name, Input<string> id, MetricRulesetState? state, CustomResourceOptions? opts = null)
    public static MetricRuleset get(String name, Output<String> id, MetricRulesetState 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:
    AggregationRules List<Pulumi.SignalFx.Inputs.MetricRulesetAggregationRule>
    Aggregation rules in the ruleset
    Created string
    Timestamp of when the metric ruleset was created
    Creator string
    ID of the creator of the metric ruleset
    LastUpdated string
    Timestamp of when the metric ruleset was last updated
    LastUpdatedBy string
    ID of user who last updated the metric ruleset
    LastUpdatedByName string
    Name of user who last updated this metric ruleset
    MetricName string
    Name of the metric
    RoutingRules List<Pulumi.SignalFx.Inputs.MetricRulesetRoutingRule>
    Location to send the input metric
    Version string
    Version of the ruleset
    AggregationRules []MetricRulesetAggregationRuleArgs
    Aggregation rules in the ruleset
    Created string
    Timestamp of when the metric ruleset was created
    Creator string
    ID of the creator of the metric ruleset
    LastUpdated string
    Timestamp of when the metric ruleset was last updated
    LastUpdatedBy string
    ID of user who last updated the metric ruleset
    LastUpdatedByName string
    Name of user who last updated this metric ruleset
    MetricName string
    Name of the metric
    RoutingRules []MetricRulesetRoutingRuleArgs
    Location to send the input metric
    Version string
    Version of the ruleset
    aggregationRules List<MetricRulesetAggregationRule>
    Aggregation rules in the ruleset
    created String
    Timestamp of when the metric ruleset was created
    creator String
    ID of the creator of the metric ruleset
    lastUpdated String
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy String
    ID of user who last updated the metric ruleset
    lastUpdatedByName String
    Name of user who last updated this metric ruleset
    metricName String
    Name of the metric
    routingRules List<MetricRulesetRoutingRule>
    Location to send the input metric
    version String
    Version of the ruleset
    aggregationRules MetricRulesetAggregationRule[]
    Aggregation rules in the ruleset
    created string
    Timestamp of when the metric ruleset was created
    creator string
    ID of the creator of the metric ruleset
    lastUpdated string
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy string
    ID of user who last updated the metric ruleset
    lastUpdatedByName string
    Name of user who last updated this metric ruleset
    metricName string
    Name of the metric
    routingRules MetricRulesetRoutingRule[]
    Location to send the input metric
    version string
    Version of the ruleset
    aggregation_rules Sequence[MetricRulesetAggregationRuleArgs]
    Aggregation rules in the ruleset
    created str
    Timestamp of when the metric ruleset was created
    creator str
    ID of the creator of the metric ruleset
    last_updated str
    Timestamp of when the metric ruleset was last updated
    last_updated_by str
    ID of user who last updated the metric ruleset
    last_updated_by_name str
    Name of user who last updated this metric ruleset
    metric_name str
    Name of the metric
    routing_rules Sequence[MetricRulesetRoutingRuleArgs]
    Location to send the input metric
    version str
    Version of the ruleset
    aggregationRules List<Property Map>
    Aggregation rules in the ruleset
    created String
    Timestamp of when the metric ruleset was created
    creator String
    ID of the creator of the metric ruleset
    lastUpdated String
    Timestamp of when the metric ruleset was last updated
    lastUpdatedBy String
    ID of user who last updated the metric ruleset
    lastUpdatedByName String
    Name of user who last updated this metric ruleset
    metricName String
    Name of the metric
    routingRules List<Property Map>
    Location to send the input metric
    version String
    Version of the ruleset

    Supporting Types

    MetricRulesetAggregationRule, MetricRulesetAggregationRuleArgs

    Aggregators List<Pulumi.SignalFx.Inputs.MetricRulesetAggregationRuleAggregator>
    The aggregator for this rule
    Enabled bool
    Status of this aggregation rule
    Matchers List<Pulumi.SignalFx.Inputs.MetricRulesetAggregationRuleMatcher>
    The matcher for this rule
    Name string
    Name of this aggregation rule
    Aggregators []MetricRulesetAggregationRuleAggregator
    The aggregator for this rule
    Enabled bool
    Status of this aggregation rule
    Matchers []MetricRulesetAggregationRuleMatcher
    The matcher for this rule
    Name string
    Name of this aggregation rule
    aggregators List<MetricRulesetAggregationRuleAggregator>
    The aggregator for this rule
    enabled Boolean
    Status of this aggregation rule
    matchers List<MetricRulesetAggregationRuleMatcher>
    The matcher for this rule
    name String
    Name of this aggregation rule
    aggregators MetricRulesetAggregationRuleAggregator[]
    The aggregator for this rule
    enabled boolean
    Status of this aggregation rule
    matchers MetricRulesetAggregationRuleMatcher[]
    The matcher for this rule
    name string
    Name of this aggregation rule
    aggregators Sequence[MetricRulesetAggregationRuleAggregator]
    The aggregator for this rule
    enabled bool
    Status of this aggregation rule
    matchers Sequence[MetricRulesetAggregationRuleMatcher]
    The matcher for this rule
    name str
    Name of this aggregation rule
    aggregators List<Property Map>
    The aggregator for this rule
    enabled Boolean
    Status of this aggregation rule
    matchers List<Property Map>
    The matcher for this rule
    name String
    Name of this aggregation rule

    MetricRulesetAggregationRuleAggregator, MetricRulesetAggregationRuleAggregatorArgs

    Dimensions List<string>
    List of dimensions to keep or drop in aggregated metric
    DropDimensions bool
    Flag specifying to keep or drop given dimensions
    OutputName string
    The aggregated metric name
    Type string
    The type of the aggregator
    Dimensions []string
    List of dimensions to keep or drop in aggregated metric
    DropDimensions bool
    Flag specifying to keep or drop given dimensions
    OutputName string
    The aggregated metric name
    Type string
    The type of the aggregator
    dimensions List<String>
    List of dimensions to keep or drop in aggregated metric
    dropDimensions Boolean
    Flag specifying to keep or drop given dimensions
    outputName String
    The aggregated metric name
    type String
    The type of the aggregator
    dimensions string[]
    List of dimensions to keep or drop in aggregated metric
    dropDimensions boolean
    Flag specifying to keep or drop given dimensions
    outputName string
    The aggregated metric name
    type string
    The type of the aggregator
    dimensions Sequence[str]
    List of dimensions to keep or drop in aggregated metric
    drop_dimensions bool
    Flag specifying to keep or drop given dimensions
    output_name str
    The aggregated metric name
    type str
    The type of the aggregator
    dimensions List<String>
    List of dimensions to keep or drop in aggregated metric
    dropDimensions Boolean
    Flag specifying to keep or drop given dimensions
    outputName String
    The aggregated metric name
    type String
    The type of the aggregator

    MetricRulesetAggregationRuleMatcher, MetricRulesetAggregationRuleMatcherArgs

    Type string
    The type of the matcher
    Filters List<Pulumi.SignalFx.Inputs.MetricRulesetAggregationRuleMatcherFilter>
    List of filters to match on
    Type string
    The type of the matcher
    Filters []MetricRulesetAggregationRuleMatcherFilter
    List of filters to match on
    type String
    The type of the matcher
    filters List<MetricRulesetAggregationRuleMatcherFilter>
    List of filters to match on
    type string
    The type of the matcher
    filters MetricRulesetAggregationRuleMatcherFilter[]
    List of filters to match on
    type str
    The type of the matcher
    filters Sequence[MetricRulesetAggregationRuleMatcherFilter]
    List of filters to match on
    type String
    The type of the matcher
    filters List<Property Map>
    List of filters to match on

    MetricRulesetAggregationRuleMatcherFilter, MetricRulesetAggregationRuleMatcherFilterArgs

    Not bool
    Flag specifying equals or not equals
    Property string
    Name of dimension to match
    PropertyValues List<string>
    List of property values to match
    Not bool
    Flag specifying equals or not equals
    Property string
    Name of dimension to match
    PropertyValues []string
    List of property values to match
    not Boolean
    Flag specifying equals or not equals
    property String
    Name of dimension to match
    propertyValues List<String>
    List of property values to match
    not boolean
    Flag specifying equals or not equals
    property string
    Name of dimension to match
    propertyValues string[]
    List of property values to match
    not_ bool
    Flag specifying equals or not equals
    property str
    Name of dimension to match
    property_values Sequence[str]
    List of property values to match
    not Boolean
    Flag specifying equals or not equals
    property String
    Name of dimension to match
    propertyValues List<String>
    List of property values to match

    MetricRulesetRoutingRule, MetricRulesetRoutingRuleArgs

    Destination string
    Destination to send the input metric
    Destination string
    Destination to send the input metric
    destination String
    Destination to send the input metric
    destination string
    Destination to send the input metric
    destination str
    Destination to send the input metric
    destination String
    Destination to send the input metric

    Package Details

    Repository
    SignalFx pulumi/pulumi-signalfx
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the signalfx Terraform Provider.
    signalfx logo
    SignalFx v7.1.3 published on Wednesday, Apr 24, 2024 by Pulumi