Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
2
agent/testcases/processor-order-mixed/expected.out
Normal file
2
agent/testcases/processor-order-mixed/expected.out
Normal file
|
@ -0,0 +1,2 @@
|
|||
new_metric_from_starlark,foo=bar baz=42i,timestamp="2023-07-13T12:53:54.197709713Z" 1689252834197709713
|
||||
old_metric_from_mock,mood=good value=23i,timestamp="2023-07-13T13:10:34Z" 1689253834000000000
|
1
agent/testcases/processor-order-mixed/input.influx
Normal file
1
agent/testcases/processor-order-mixed/input.influx
Normal file
|
@ -0,0 +1 @@
|
|||
old_metric_from_mock,mood=good value=23i 1689253834000000000
|
25
agent/testcases/processor-order-mixed/telegraf.conf
Normal file
25
agent/testcases/processor-order-mixed/telegraf.conf
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Test for using the appearance order in the file for processor order
|
||||
[[inputs.file]]
|
||||
files = ["testcases/processor-order-appearance/input.influx"]
|
||||
data_format = "influx"
|
||||
|
||||
[[processors.starlark]]
|
||||
source = '''
|
||||
def apply(metric):
|
||||
metrics = []
|
||||
|
||||
m = Metric("new_metric_from_starlark")
|
||||
m.tags["foo"] = "bar"
|
||||
m.fields["baz"] = 42
|
||||
m.time = 1689252834197709713
|
||||
metrics.append(m)
|
||||
metrics.append(metric)
|
||||
|
||||
return metrics
|
||||
'''
|
||||
|
||||
[[processors.date]]
|
||||
field_key = "timestamp"
|
||||
date_format = "2006-01-02T15:04:05.999999999Z"
|
||||
timezone = "UTC"
|
||||
order = 1
|
Loading…
Add table
Add a link
Reference in a new issue