logzio.MetricsRollupRules
Explore with Pulumi AI
# 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:
- Account
Id double - The metrics account ID for the metrics rollup rule.
- Labels List<string>
- A list of label names to be eliminated from the metric.
- Labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - Metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - Drop
Original boolMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - Filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - Metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - Name string
- A human-readable name for the rollup rule.
- New
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - Rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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 float64 - The metrics account ID for the metrics rollup rule.
- Labels []string
- A list of label names to be eliminated from the metric.
- Labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - Metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - Drop
Original boolMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - Filter
Metrics
Rollup Rules Filter Args - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - Metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - Name string
- A human-readable name for the rollup rule.
- New
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - Rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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 Double - The metrics account ID for the metrics rollup rule.
- labels List<String>
- A list of label names to be eliminated from the metric.
- labels
Elimination StringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Type String - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - drop
Original BooleanMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - metric
Name String - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - name String
- A human-readable name for the rollup rule.
- new
Metric StringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function String - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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 number - The metrics account ID for the metrics rollup rule.
- labels string[]
- A list of label names to be eliminated from the metric.
- labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - drop
Original booleanMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - name string
- A human-readable name for the rollup rule.
- new
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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_ strmethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric_
type str - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - drop_
original_ boolmetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - filter
Metrics
Rollup Rules Filter Args - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - metric_
name str - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - name str
- A human-readable name for the rollup rule.
- new_
metric_ strname_ template - 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
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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 Number - The metrics account ID for the metrics rollup rule.
- labels List<String>
- A list of label names to be eliminated from the metric.
- labels
Elimination StringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Type String - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - drop
Original BooleanMetric - 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
orfilter
must be specified, but not both. - metric
Name String - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - name String
- A human-readable name for the rollup rule.
- new
Metric StringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function String - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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:
- Cluster
Id string - Drop
Policy stringRule Id - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Deleted bool - Namespaces List<string>
- Version double
- Cluster
Id string - Drop
Policy stringRule Id - Id string
- The provider-assigned unique ID for this managed resource.
- Is
Deleted bool - Namespaces []string
- Version float64
- cluster
Id String - drop
Policy StringRule Id - id String
- The provider-assigned unique ID for this managed resource.
- is
Deleted Boolean - namespaces List<String>
- version Double
- cluster
Id string - drop
Policy stringRule Id - id string
- The provider-assigned unique ID for this managed resource.
- is
Deleted boolean - namespaces string[]
- version number
- cluster_
id str - drop_
policy_ strrule_ id - id str
- The provider-assigned unique ID for this managed resource.
- is_
deleted bool - namespaces Sequence[str]
- version float
- cluster
Id String - drop
Policy StringRule Id - id String
- The provider-assigned unique ID for this managed resource.
- is
Deleted 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.
- Account
Id double - The metrics account ID for the metrics rollup rule.
- Cluster
Id string - Drop
Original boolMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - Drop
Policy stringRule Id - Filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - Is
Deleted bool - Labels List<string>
- A list of label names to be eliminated from the metric.
- Labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - Metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - Metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - Name string
- A human-readable name for the rollup rule.
- Namespaces List<string>
- New
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - Rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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
- Account
Id float64 - The metrics account ID for the metrics rollup rule.
- Cluster
Id string - Drop
Original boolMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - Drop
Policy stringRule Id - Filter
Metrics
Rollup Rules Filter Args - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - Is
Deleted bool - Labels []string
- A list of label names to be eliminated from the metric.
- Labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - Metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - Metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - Name string
- A human-readable name for the rollup rule.
- Namespaces []string
- New
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - Rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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
- account
Id Double - The metrics account ID for the metrics rollup rule.
- cluster
Id String - drop
Original BooleanMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - drop
Policy StringRule Id - filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - is
Deleted Boolean - labels List<String>
- A list of label names to be eliminated from the metric.
- labels
Elimination StringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Name String - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - metric
Type String - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - name String
- A human-readable name for the rollup rule.
- namespaces List<String>
- new
Metric StringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function String - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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
- account
Id number - The metrics account ID for the metrics rollup rule.
- cluster
Id string - drop
Original booleanMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - drop
Policy stringRule Id - filter
Metrics
Rollup Rules Filter - A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - is
Deleted boolean - labels string[]
- A list of label names to be eliminated from the metric.
- labels
Elimination stringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Name string - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - metric
Type string - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - name string
- A human-readable name for the rollup rule.
- namespaces string[]
- new
Metric stringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function string - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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_ boolmetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - drop_
policy_ strrule_ id - filter
Metrics
Rollup Rules Filter Args - A filter block to match metrics by label values. Either
metric_name
orfilter
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_ strmethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric_
name str - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - metric_
type str - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - name str
- A human-readable name for the rollup rule.
- namespaces Sequence[str]
- new_
metric_ strname_ template - 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
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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
- account
Id Number - The metrics account ID for the metrics rollup rule.
- cluster
Id String - drop
Original BooleanMetric - Whether to drop the original metric after creating the rollup. Defaults to
false
. - drop
Policy StringRule Id - filter Property Map
- A filter block to match metrics by label values. Either
metric_name
orfilter
must be specified, but not both. - is
Deleted Boolean - labels List<String>
- A list of label names to be eliminated from the metric.
- labels
Elimination StringMethod - The method for eliminating labels. Valid values are
EXCLUDE_BY
andGROUP_BY
. - metric
Name String - The name of the metric for which to create the rollup rule. Either
metric_name
orfilter
must be specified, but not both. - metric
Type String - The type of the metric. Valid values are
GAUGE
,COUNTER
,DELTA_COUNTER
,CUMULATIVE_COUNTER
, andMEASUREMENT
. - name String
- A human-readable name for the rollup rule.
- namespaces List<String>
- new
Metric StringName Template - A template for generating new metric names. Use
{{metricName}}
to reference the original metric name. - rollup
Function String - The aggregation function to use for rolling up the metric. Required for all metric types. For
COUNTER
,DELTA_COUNTER
, andCUMULATIVE_COUNTER
types, must beSUM
. ForMEASUREMENT
andGAUGE
metric types, any valid aggregation function is allowed. Valid values includeSUM
,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<Metrics
Rollup Rules Filter Expression> - A list of filter expressions.
- Expressions
[]Metrics
Rollup Rules Filter Expression - A list of filter expressions.
- expressions
List<Metrics
Rollup Rules Filter Expression> - A list of filter expressions.
- expressions
Metrics
Rollup Rules Filter Expression[] - A list of filter expressions.
- expressions
Sequence[Metrics
Rollup Rules Filter Expression] - A list of filter expressions.
- expressions List<Property Map>
- A list of filter expressions.
MetricsRollupRulesFilterExpression, MetricsRollupRulesFilterExpressionArgs
- Comparison string
- The comparison operator. Valid values are
EQ
,NOT_EQ
,REGEX_MATCH
, andREGEX_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
, andREGEX_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
, andREGEX_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
, andREGEX_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
, andREGEX_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
, andREGEX_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.