We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
telegraf.conf
[agent] [[inputs.file]] files = ["metrics_in_1.json"] data_format = "json" json_time_format = "unix" [[processors.starlark]] order = 1 source = ''' def apply(metric): metric.fields["delay"] = int(metric.time / 1000000000) - (metric.fields["time"] / 1000) metric.fields.pop("time") metric.fields.pop("timeout") return metric ''' [[aggregators.minmax]] period = "60s" drop_original = true [[outputs.file]] files = ["stdout", "metrics_delay_max.out"]
metrics_in_1.json
{"time": 1594971809000, "timeout": 100}
telegraf-1.15.0~rc3
Mac OS 10.15.5 (19F101)
$ telegraf --config telegraf.conf
starlark
minmax
2020-07-17T07:52:40Z D! [aggregators.minmax] Updated aggregation range [2020-07-17 16:52:40 +0900 KST, 2020-07-17 16:52:50 +0900 KST] panic: runtime error: index out of range [0] with length 0 goroutine 12 [running]: github.com/influxdata/telegraf/plugins/processors/starlark.(*Starlark).Add(0xc0005d5c00, 0x2f58260, 0xc0008ce380, 0x2f49200, 0xc00020a060, 0x0, 0x0) /go/src/github.com/influxdata/telegraf/plugins/processors/starlark/starlark.go:127 +0xa4a github.com/influxdata/telegraf/models.(*RunningProcessor).Add(0xc0000a5a70, 0x2f58260, 0xc0008ce380, 0x2f49200, 0xc00020a060, 0x0, 0x0) /go/src/github.com/influxdata/telegraf/models/running_processor.go:95 +0x106 github.com/influxdata/telegraf/agent.(*Agent).runProcessors.func1(0xc0005d0000, 0xc0001883e0) /go/src/github.com/influxdata/telegraf/agent/agent.go:541 +0x156 created by github.com/influxdata/telegraf/agent.(*Agent).runProcessors /go/src/github.com/influxdata/telegraf/agent/agent.go:536 +0x90
The text was updated successfully, but these errors were encountered:
Thanks for the report, we will include the fix for this in 1.15.0-rc4.
Sorry, something went wrong.
danielnelson
Successfully merging a pull request may close this issue.
Relevant telegraf.conf:
telegraf.conf
metrics_in_1.json
System info:
telegraf-1.15.0~rc3
Mac OS 10.15.5 (19F101)
Docker
Steps to reproduce:
$ telegraf --config telegraf.conf
Expected behavior:
starlark
+ aggregator:minmax
=> Aggregation SuccessActual behavior:
Additional info:
The text was updated successfully, but these errors were encountered: