-
Using version I'm ingesting millions of of log events that I'm transforming into +1 count metrics. These events span over 1 hour. The metric conversion part went smoothly, but then I was hoping to aggregate them into 10 second bins before pushing to the metric server. However, during testing I couldn't seem to get the metric aggregation to respect the Here's the relevant part of my config [sources.in]
type = "stdin"
[transforms.alb]
type = "remap"
inputs = ["in"]
source = '''
. = parse_aws_alb_log!(.message)
.timestamp = parse_timestamp!(.request_creation_time, "%+")
'''
[transforms.alb_metric]
type = "log_to_metric"
inputs = [ "alb" ]
[[transforms.alb_metric.metrics]]
type = "counter"
field = "elb_status_code"
name = "load_balancer_request_response"
namespace = "test"
[transforms.alb_metric.metrics.tags]
status = "{{elb_status_code}}"
target_group = "{{target_group_arn}}"
[transforms.aggregated_alb_metric]
type = "aggregate"
inputs = [ "alb_metric"]
interval_ms = 10_000 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
I think the confusion here may lie with how |
Beta Was this translation helpful? Give feedback.
I think the confusion here may lie with how
interval_ms
works. It aggregates based on real-time windows rather than using the timestamps of the metrics. That is: if you set10_000
, it will aggregate incoming metrics for 10 seconds and then flush. I think you are seeing a single metric when setting it to10_000
because it is processing all of the input much more quickly than that.