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
13
plugins/processors/starlark/testdata/scale.star
vendored
Normal file
13
plugins/processors/starlark/testdata/scale.star
vendored
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Multiply any float fields by 10
|
||||
#
|
||||
# Example Input:
|
||||
# modbus,host=hostname Current=1.22,Energy=0,Frequency=60i,Power=0,Voltage=123.9000015258789 1554079521000000000
|
||||
#
|
||||
# Example Output:
|
||||
# modbus,host=hostname Current=12.2,Energy=0,Frequency=60i,Power=0,Voltage=1239.000015258789 1554079521000000000
|
||||
|
||||
def apply(metric):
|
||||
for k, v in metric.fields.items():
|
||||
if type(v) == "float":
|
||||
metric.fields[k] = v * 10
|
||||
return metric
|
Loading…
Add table
Add a link
Reference in a new issue