1. Packages
  2. Logzio Provider
  3. API Docs
  4. MetricsRollupRules
logzio 1.24.0 published on Wednesday, Sep 10, 2025 by logzio

logzio.MetricsRollupRules

Explore with Pulumi AI

logzio logo
logzio 1.24.0 published on Wednesday, Sep 10, 2025 by logzio

    # logzio.MetricsRollupRules

    Provides a Logz.io metrics rollup rules resource. This allows you to manage metrics rollup rules in your Logz.io account.

    Example Usage

    Basic metric name-based rule

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const cpuUsageRollup = new logzio.MetricsRollupRules("cpuUsageRollup", {
        accountId: 123456,
        labels: [
            "instance_id",
            "process_id",
        ],
        labelsEliminationMethod: "EXCLUDE_BY",
        metricName: "cpu_usage",
        metricType: "GAUGE",
        rollupFunction: "LAST",
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    cpu_usage_rollup = logzio.MetricsRollupRules("cpuUsageRollup",
        account_id=123456,
        labels=[
            "instance_id",
            "process_id",
        ],
        labels_elimination_method="EXCLUDE_BY",
        metric_name="cpu_usage",
        metric_type="GAUGE",
        rollup_function="LAST")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logzio.NewMetricsRollupRules(ctx, "cpuUsageRollup", &logzio.MetricsRollupRulesArgs{
    			AccountId: pulumi.Float64(123456),
    			Labels: pulumi.StringArray{
    				pulumi.String("instance_id"),
    				pulumi.String("process_id"),
    			},
    			LabelsEliminationMethod: pulumi.String("EXCLUDE_BY"),
    			MetricName:              pulumi.String("cpu_usage"),
    			MetricType:              pulumi.String("GAUGE"),
    			RollupFunction:          pulumi.String("LAST"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var cpuUsageRollup = new Logzio.MetricsRollupRules("cpuUsageRollup", new()
        {
            AccountId = 123456,
            Labels = new[]
            {
                "instance_id",
                "process_id",
            },
            LabelsEliminationMethod = "EXCLUDE_BY",
            MetricName = "cpu_usage",
            MetricType = "GAUGE",
            RollupFunction = "LAST",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.MetricsRollupRules;
    import com.pulumi.logzio.MetricsRollupRulesArgs;
    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) {
            var cpuUsageRollup = new MetricsRollupRules("cpuUsageRollup", MetricsRollupRulesArgs.builder()
                .accountId(123456)
                .labels(            
                    "instance_id",
                    "process_id")
                .labelsEliminationMethod("EXCLUDE_BY")
                .metricName("cpu_usage")
                .metricType("GAUGE")
                .rollupFunction("LAST")
                .build());
    
        }
    }
    
    resources:
      cpuUsageRollup:
        type: logzio:MetricsRollupRules
        properties:
          accountId: 123456
          labels:
            - instance_id
            - process_id
          labelsEliminationMethod: EXCLUDE_BY
          metricName: cpu_usage
          metricType: GAUGE
          rollupFunction: LAST
    

    Filter-based rule with advanced features

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const frontendMetricsRollup = new logzio.MetricsRollupRules("frontendMetricsRollup", {
        accountId: 123456,
        dropOriginalMetric: true,
        filter: {
            expressions: [
                {
                    comparison: "EQ",
                    name: "service",
                    value: "frontend",
                },
                {
                    comparison: "REGEX_MATCH",
                    name: "region",
                    value: "us-.*",
                },
            ],
        },
        labels: [
            "service",
            "region",
        ],
        labelsEliminationMethod: "GROUP_BY",
        metricType: "COUNTER",
        newMetricNameTemplate: "rollup.frontend.{{metricName}}",
        rollupFunction: "SUM",
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    frontend_metrics_rollup = logzio.MetricsRollupRules("frontendMetricsRollup",
        account_id=123456,
        drop_original_metric=True,
        filter={
            "expressions": [
                {
                    "comparison": "EQ",
                    "name": "service",
                    "value": "frontend",
                },
                {
                    "comparison": "REGEX_MATCH",
                    "name": "region",
                    "value": "us-.*",
                },
            ],
        },
        labels=[
            "service",
            "region",
        ],
        labels_elimination_method="GROUP_BY",
        metric_type="COUNTER",
        new_metric_name_template="rollup.frontend.{{metricName}}",
        rollup_function="SUM")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logzio.NewMetricsRollupRules(ctx, "frontendMetricsRollup", &logzio.MetricsRollupRulesArgs{
    			AccountId:          pulumi.Float64(123456),
    			DropOriginalMetric: pulumi.Bool(true),
    			Filter: &logzio.MetricsRollupRulesFilterArgs{
    				Expressions: logzio.MetricsRollupRulesFilterExpressionArray{
    					&logzio.MetricsRollupRulesFilterExpressionArgs{
    						Comparison: pulumi.String("EQ"),
    						Name:       pulumi.String("service"),
    						Value:      pulumi.String("frontend"),
    					},
    					&logzio.MetricsRollupRulesFilterExpressionArgs{
    						Comparison: pulumi.String("REGEX_MATCH"),
    						Name:       pulumi.String("region"),
    						Value:      pulumi.String("us-.*"),
    					},
    				},
    			},
    			Labels: pulumi.StringArray{
    				pulumi.String("service"),
    				pulumi.String("region"),
    			},
    			LabelsEliminationMethod: pulumi.String("GROUP_BY"),
    			MetricType:              pulumi.String("COUNTER"),
    			NewMetricNameTemplate:   pulumi.String("rollup.frontend.{{metricName}}"),
    			RollupFunction:          pulumi.String("SUM"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var frontendMetricsRollup = new Logzio.MetricsRollupRules("frontendMetricsRollup", new()
        {
            AccountId = 123456,
            DropOriginalMetric = true,
            Filter = new Logzio.Inputs.MetricsRollupRulesFilterArgs
            {
                Expressions = new[]
                {
                    new Logzio.Inputs.MetricsRollupRulesFilterExpressionArgs
                    {
                        Comparison = "EQ",
                        Name = "service",
                        Value = "frontend",
                    },
                    new Logzio.Inputs.MetricsRollupRulesFilterExpressionArgs
                    {
                        Comparison = "REGEX_MATCH",
                        Name = "region",
                        Value = "us-.*",
                    },
                },
            },
            Labels = new[]
            {
                "service",
                "region",
            },
            LabelsEliminationMethod = "GROUP_BY",
            MetricType = "COUNTER",
            NewMetricNameTemplate = "rollup.frontend.{{metricName}}",
            RollupFunction = "SUM",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.MetricsRollupRules;
    import com.pulumi.logzio.MetricsRollupRulesArgs;
    import com.pulumi.logzio.inputs.MetricsRollupRulesFilterArgs;
    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) {
            var frontendMetricsRollup = new MetricsRollupRules("frontendMetricsRollup", MetricsRollupRulesArgs.builder()
                .accountId(123456)
                .dropOriginalMetric(true)
                .filter(MetricsRollupRulesFilterArgs.builder()
                    .expressions(                
                        MetricsRollupRulesFilterExpressionArgs.builder()
                            .comparison("EQ")
                            .name("service")
                            .value("frontend")
                            .build(),
                        MetricsRollupRulesFilterExpressionArgs.builder()
                            .comparison("REGEX_MATCH")
                            .name("region")
                            .value("us-.*")
                            .build())
                    .build())
                .labels(            
                    "service",
                    "region")
                .labelsEliminationMethod("GROUP_BY")
                .metricType("COUNTER")
                .newMetricNameTemplate("rollup.frontend.{{metricName}}")
                .rollupFunction("SUM")
                .build());
    
        }
    }
    
    resources:
      frontendMetricsRollup:
        type: logzio:MetricsRollupRules
        properties:
          accountId: 123456
          dropOriginalMetric: true
          filter:
            expressions:
              - comparison: EQ
                name: service
                value: frontend
              - comparison: REGEX_MATCH
                name: region
                value: us-.*
          labels:
            - service
            - region
          labelsEliminationMethod: GROUP_BY
          metricType: COUNTER
          newMetricNameTemplate: rollup.frontend.{{metricName}}
          rollupFunction: SUM
    

    MEASUREMENT metric type with statistical aggregation

    import * as pulumi from "@pulumi/pulumi";
    import * as logzio from "@pulumi/logzio";
    
    const responseTimeRollup = new logzio.MetricsRollupRules("responseTimeRollup", {
        accountId: 123456,
        labels: [
            "endpoint",
            "method",
        ],
        labelsEliminationMethod: "EXCLUDE_BY",
        metricName: "http_response_time",
        metricType: "MEASUREMENT",
        rollupFunction: "P95",
    });
    
    import pulumi
    import pulumi_logzio as logzio
    
    response_time_rollup = logzio.MetricsRollupRules("responseTimeRollup",
        account_id=123456,
        labels=[
            "endpoint",
            "method",
        ],
        labels_elimination_method="EXCLUDE_BY",
        metric_name="http_response_time",
        metric_type="MEASUREMENT",
        rollup_function="P95")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/logzio/logzio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := logzio.NewMetricsRollupRules(ctx, "responseTimeRollup", &logzio.MetricsRollupRulesArgs{
    			AccountId: pulumi.Float64(123456),
    			Labels: pulumi.StringArray{
    				pulumi.String("endpoint"),
    				pulumi.String("method"),
    			},
    			LabelsEliminationMethod: pulumi.String("EXCLUDE_BY"),
    			MetricName:              pulumi.String("http_response_time"),
    			MetricType:              pulumi.String("MEASUREMENT"),
    			RollupFunction:          pulumi.String("P95"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Logzio = Pulumi.Logzio;
    
    return await Deployment.RunAsync(() => 
    {
        var responseTimeRollup = new Logzio.MetricsRollupRules("responseTimeRollup", new()
        {
            AccountId = 123456,
            Labels = new[]
            {
                "endpoint",
                "method",
            },
            LabelsEliminationMethod = "EXCLUDE_BY",
            MetricName = "http_response_time",
            MetricType = "MEASUREMENT",
            RollupFunction = "P95",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.logzio.MetricsRollupRules;
    import com.pulumi.logzio.MetricsRollupRulesArgs;
    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) {
            var responseTimeRollup = new MetricsRollupRules("responseTimeRollup", MetricsRollupRulesArgs.builder()
                .accountId(123456)
                .labels(            
                    "endpoint",
                    "method")
                .labelsEliminationMethod("EXCLUDE_BY")
                .metricName("http_response_time")
                .metricType("MEASUREMENT")
                .rollupFunction("P95")
                .build());
    
        }
    }
    
    resources:
      responseTimeRollup:
        type: logzio:MetricsRollupRules
        properties:
          accountId: 123456
          labels:
            - endpoint
            - method
          labelsEliminationMethod: EXCLUDE_BY
          metricName: http_response_time
          metricType: MEASUREMENT
          rollupFunction: P95
    

    Create MetricsRollupRules Resource

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

    Constructor syntax

    new MetricsRollupRules(name: string, args: MetricsRollupRulesArgs, opts?: CustomResourceOptions);
    @overload
    def MetricsRollupRules(resource_name: str,
                           args: MetricsRollupRulesArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def MetricsRollupRules(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           account_id: Optional[float] = None,
                           labels: Optional[Sequence[str]] = None,
                           labels_elimination_method: Optional[str] = None,
                           metric_type: Optional[str] = None,
                           drop_original_metric: Optional[bool] = None,
                           filter: Optional[MetricsRollupRulesFilterArgs] = None,
                           metric_name: Optional[str] = None,
                           name: Optional[str] = None,
                           new_metric_name_template: Optional[str] = None,
                           rollup_function: Optional[str] = None)
    func NewMetricsRollupRules(ctx *Context, name string, args MetricsRollupRulesArgs, opts ...ResourceOption) (*MetricsRollupRules, error)
    public MetricsRollupRules(string name, MetricsRollupRulesArgs args, CustomResourceOptions? opts = null)
    public MetricsRollupRules(String name, MetricsRollupRulesArgs args)
    public MetricsRollupRules(String name, MetricsRollupRulesArgs args, CustomResourceOptions options)
    
    type: logzio:MetricsRollupRules
    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 MetricsRollupRulesArgs
    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 MetricsRollupRulesArgs
    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 MetricsRollupRulesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MetricsRollupRulesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MetricsRollupRulesArgs
    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 metricsRollupRulesResource = new Logzio.MetricsRollupRules("metricsRollupRulesResource", new()
    {
        AccountId = 0,
        Labels = new[]
        {
            "string",
        },
        LabelsEliminationMethod = "string",
        MetricType = "string",
        DropOriginalMetric = false,
        Filter = new Logzio.Inputs.MetricsRollupRulesFilterArgs
        {
            Expressions = new[]
            {
                new Logzio.Inputs.MetricsRollupRulesFilterExpressionArgs
                {
                    Comparison = "string",
                    Name = "string",
                    Value = "string",
                },
            },
        },
        MetricName = "string",
        Name = "string",
        NewMetricNameTemplate = "string",
        RollupFunction = "string",
    });
    
    example, err := logzio.NewMetricsRollupRules(ctx, "metricsRollupRulesResource", &logzio.MetricsRollupRulesArgs{
    	AccountId: pulumi.Float64(0),
    	Labels: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	LabelsEliminationMethod: pulumi.String("string"),
    	MetricType:              pulumi.String("string"),
    	DropOriginalMetric:      pulumi.Bool(false),
    	Filter: &logzio.MetricsRollupRulesFilterArgs{
    		Expressions: logzio.MetricsRollupRulesFilterExpressionArray{
    			&logzio.MetricsRollupRulesFilterExpressionArgs{
    				Comparison: pulumi.String("string"),
    				Name:       pulumi.String("string"),
    				Value:      pulumi.String("string"),
    			},
    		},
    	},
    	MetricName:            pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	NewMetricNameTemplate: pulumi.String("string"),
    	RollupFunction:        pulumi.String("string"),
    })
    
    var metricsRollupRulesResource = new MetricsRollupRules("metricsRollupRulesResource", MetricsRollupRulesArgs.builder()
        .accountId(0.0)
        .labels("string")
        .labelsEliminationMethod("string")
        .metricType("string")
        .dropOriginalMetric(false)
        .filter(MetricsRollupRulesFilterArgs.builder()
            .expressions(MetricsRollupRulesFilterExpressionArgs.builder()
                .comparison("string")
                .name("string")
                .value("string")
                .build())
            .build())
        .metricName("string")
        .name("string")
        .newMetricNameTemplate("string")
        .rollupFunction("string")
        .build());
    
    metrics_rollup_rules_resource = logzio.MetricsRollupRules("metricsRollupRulesResource",
        account_id=0,
        labels=["string"],
        labels_elimination_method="string",
        metric_type="string",
        drop_original_metric=False,
        filter={
            "expressions": [{
                "comparison": "string",
                "name": "string",
                "value": "string",
            }],
        },
        metric_name="string",
        name="string",
        new_metric_name_template="string",
        rollup_function="string")
    
    const metricsRollupRulesResource = new logzio.MetricsRollupRules("metricsRollupRulesResource", {
        accountId: 0,
        labels: ["string"],
        labelsEliminationMethod: "string",
        metricType: "string",
        dropOriginalMetric: false,
        filter: {
            expressions: [{
                comparison: "string",
                name: "string",
                value: "string",
            }],
        },
        metricName: "string",
        name: "string",
        newMetricNameTemplate: "string",
        rollupFunction: "string",
    });
    
    type: logzio:MetricsRollupRules
    properties:
        accountId: 0
        dropOriginalMetric: false
        filter:
            expressions:
                - comparison: string
                  name: string
                  value: string
        labels:
            - string
        labelsEliminationMethod: string
        metricName: string
        metricType: string
        name: string
        newMetricNameTemplate: string
        rollupFunction: string
    

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

    AccountId double
    The metrics account ID for the metrics rollup rule.
    Labels List<string>
    A list of label names to be eliminated from the metric.
    LabelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    MetricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    DropOriginalMetric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    Filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    MetricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    Name string
    A human-readable name for the rollup rule.
    NewMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    RollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    AccountId float64
    The metrics account ID for the metrics rollup rule.
    Labels []string
    A list of label names to be eliminated from the metric.
    LabelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    MetricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    DropOriginalMetric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    Filter MetricsRollupRulesFilterArgs
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    MetricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    Name string
    A human-readable name for the rollup rule.
    NewMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    RollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    accountId Double
    The metrics account ID for the metrics rollup rule.
    labels List<String>
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod String
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricType String
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    dropOriginalMetric Boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    metricName String
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    name String
    A human-readable name for the rollup rule.
    newMetricNameTemplate String
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction String
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    accountId number
    The metrics account ID for the metrics rollup rule.
    labels string[]
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    dropOriginalMetric boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    metricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    name string
    A human-readable name for the rollup rule.
    newMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    account_id float
    The metrics account ID for the metrics rollup rule.
    labels Sequence[str]
    A list of label names to be eliminated from the metric.
    labels_elimination_method str
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metric_type str
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    drop_original_metric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    filter MetricsRollupRulesFilterArgs
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    metric_name str
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    name str
    A human-readable name for the rollup rule.
    new_metric_name_template str
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollup_function str
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    accountId Number
    The metrics account ID for the metrics rollup rule.
    labels List<String>
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod String
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricType String
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    dropOriginalMetric Boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    filter Property Map
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    metricName String
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    name String
    A human-readable name for the rollup rule.
    newMetricNameTemplate String
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction String
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).

    Outputs

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

    ClusterId string
    DropPolicyRuleId string
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDeleted bool
    Namespaces List<string>
    Version double
    ClusterId string
    DropPolicyRuleId string
    Id string
    The provider-assigned unique ID for this managed resource.
    IsDeleted bool
    Namespaces []string
    Version float64
    clusterId String
    dropPolicyRuleId String
    id String
    The provider-assigned unique ID for this managed resource.
    isDeleted Boolean
    namespaces List<String>
    version Double
    clusterId string
    dropPolicyRuleId string
    id string
    The provider-assigned unique ID for this managed resource.
    isDeleted boolean
    namespaces string[]
    version number
    cluster_id str
    drop_policy_rule_id str
    id str
    The provider-assigned unique ID for this managed resource.
    is_deleted bool
    namespaces Sequence[str]
    version float
    clusterId String
    dropPolicyRuleId String
    id String
    The provider-assigned unique ID for this managed resource.
    isDeleted Boolean
    namespaces List<String>
    version Number

    Look up Existing MetricsRollupRules Resource

    Get an existing MetricsRollupRules 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?: MetricsRollupRulesState, opts?: CustomResourceOptions): MetricsRollupRules
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            account_id: Optional[float] = None,
            cluster_id: Optional[str] = None,
            drop_original_metric: Optional[bool] = None,
            drop_policy_rule_id: Optional[str] = None,
            filter: Optional[MetricsRollupRulesFilterArgs] = None,
            is_deleted: Optional[bool] = None,
            labels: Optional[Sequence[str]] = None,
            labels_elimination_method: Optional[str] = None,
            metric_name: Optional[str] = None,
            metric_type: Optional[str] = None,
            name: Optional[str] = None,
            namespaces: Optional[Sequence[str]] = None,
            new_metric_name_template: Optional[str] = None,
            rollup_function: Optional[str] = None,
            version: Optional[float] = None) -> MetricsRollupRules
    func GetMetricsRollupRules(ctx *Context, name string, id IDInput, state *MetricsRollupRulesState, opts ...ResourceOption) (*MetricsRollupRules, error)
    public static MetricsRollupRules Get(string name, Input<string> id, MetricsRollupRulesState? state, CustomResourceOptions? opts = null)
    public static MetricsRollupRules get(String name, Output<String> id, MetricsRollupRulesState state, CustomResourceOptions options)
    resources:  _:    type: logzio:MetricsRollupRules    get:      id: ${id}
    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:
    AccountId double
    The metrics account ID for the metrics rollup rule.
    ClusterId string
    DropOriginalMetric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    DropPolicyRuleId string
    Filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    IsDeleted bool
    Labels List<string>
    A list of label names to be eliminated from the metric.
    LabelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    MetricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    MetricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    Name string
    A human-readable name for the rollup rule.
    Namespaces List<string>
    NewMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    RollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    Version double
    AccountId float64
    The metrics account ID for the metrics rollup rule.
    ClusterId string
    DropOriginalMetric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    DropPolicyRuleId string
    Filter MetricsRollupRulesFilterArgs
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    IsDeleted bool
    Labels []string
    A list of label names to be eliminated from the metric.
    LabelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    MetricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    MetricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    Name string
    A human-readable name for the rollup rule.
    Namespaces []string
    NewMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    RollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    Version float64
    accountId Double
    The metrics account ID for the metrics rollup rule.
    clusterId String
    dropOriginalMetric Boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    dropPolicyRuleId String
    filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    isDeleted Boolean
    labels List<String>
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod String
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricName String
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    metricType String
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    name String
    A human-readable name for the rollup rule.
    namespaces List<String>
    newMetricNameTemplate String
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction String
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    version Double
    accountId number
    The metrics account ID for the metrics rollup rule.
    clusterId string
    dropOriginalMetric boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    dropPolicyRuleId string
    filter MetricsRollupRulesFilter
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    isDeleted boolean
    labels string[]
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod string
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricName string
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    metricType string
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    name string
    A human-readable name for the rollup rule.
    namespaces string[]
    newMetricNameTemplate string
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction string
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    version number
    account_id float
    The metrics account ID for the metrics rollup rule.
    cluster_id str
    drop_original_metric bool
    Whether to drop the original metric after creating the rollup. Defaults to false.
    drop_policy_rule_id str
    filter MetricsRollupRulesFilterArgs
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    is_deleted bool
    labels Sequence[str]
    A list of label names to be eliminated from the metric.
    labels_elimination_method str
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metric_name str
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    metric_type str
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    name str
    A human-readable name for the rollup rule.
    namespaces Sequence[str]
    new_metric_name_template str
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollup_function str
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    version float
    accountId Number
    The metrics account ID for the metrics rollup rule.
    clusterId String
    dropOriginalMetric Boolean
    Whether to drop the original metric after creating the rollup. Defaults to false.
    dropPolicyRuleId String
    filter Property Map
    A filter block to match metrics by label values. Either metric_name or filter must be specified, but not both.
    isDeleted Boolean
    labels List<String>
    A list of label names to be eliminated from the metric.
    labelsEliminationMethod String
    The method for eliminating labels. Valid values are EXCLUDE_BY and GROUP_BY.
    metricName String
    The name of the metric for which to create the rollup rule. Either metric_name or filter must be specified, but not both.
    metricType String
    The type of the metric. Valid values are GAUGE, COUNTER, DELTA_COUNTER, CUMULATIVE_COUNTER, and MEASUREMENT.
    name String
    A human-readable name for the rollup rule.
    namespaces List<String>
    newMetricNameTemplate String
    A template for generating new metric names. Use {{metricName}} to reference the original metric name.
    rollupFunction String
    The aggregation function to use for rolling up the metric. Required for all metric types. For COUNTER, DELTA_COUNTER, and CUMULATIVE_COUNTER types, must be SUM. For MEASUREMENT and GAUGE metric types, any valid aggregation function is allowed. Valid values include SUM, MIN, MAX, COUNT, LAST, MEAN, MEDIAN, STDEV, SUMSQ, and percentiles (P10, P20, P25, P30, P40, P50, P60, P70, P75, P80, P90, P95, P99, P999, P9999).
    version Number

    Supporting Types

    MetricsRollupRulesFilter, MetricsRollupRulesFilterArgs

    expressions List<Property Map>
    A list of filter expressions.

    MetricsRollupRulesFilterExpression, MetricsRollupRulesFilterExpressionArgs

    Comparison string
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    Name string
    The label name to match against.
    Value string
    The value to match.
    Comparison string
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    Name string
    The label name to match against.
    Value string
    The value to match.
    comparison String
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name String
    The label name to match against.
    value String
    The value to match.
    comparison string
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name string
    The label name to match against.
    value string
    The value to match.
    comparison str
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name str
    The label name to match against.
    value str
    The value to match.
    comparison String
    The comparison operator. Valid values are EQ, NOT_EQ, REGEX_MATCH, and REGEX_NO_MATCH.
    name String
    The label name to match against.
    value String
    The value to match.

    Import

    Metrics rollup rules can be imported using their ID:

    bash

    $ pulumi import logzio:index/metricsRollupRules:MetricsRollupRules my_rollup_rule "rule_id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    logzio logzio/terraform-provider-logzio
    License
    Notes
    This Pulumi package is based on the logzio Terraform Provider.
    logzio logo
    logzio 1.24.0 published on Wednesday, Sep 10, 2025 by logzio