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
|
@ -0,0 +1,6 @@
|
|||
# Example for decoding fields that contain nested JSON structures.
|
||||
#
|
||||
# Input:
|
||||
# in,host=myhost,type=diagnostic hops=10,latency=1.23,id-1234="{\"address\": \"AB1A\", \"status\": \"online\"}",id-0000="{\"status\": \"offline\"}",id-5678="{\"address\": \"0000\", \"status\": \"online\"}" 1666006350000000000
|
||||
|
||||
json_nested_fields_exclude = ["hops", "latency"]
|
|
@ -0,0 +1,6 @@
|
|||
# Example for decoding fields that contain nested JSON structures.
|
||||
#
|
||||
# Input:
|
||||
# in,host=myhost,type=diagnostic hops=10,latency=1.23,id-1234="{\"address\": \"AB1A\", \"status\": \"online\"}",id-0000="{\"status\": \"offline\"}",id-5678="{\"address\": \"0000\", \"status\": \"online\"}" 1666006350000000000
|
||||
|
||||
json_nested_fields_include = ["id-*"]
|
23
plugins/serializers/json/testcases/nested_fields_out.json
Normal file
23
plugins/serializers/json/testcases/nested_fields_out.json
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"fields": {
|
||||
"id-1234": {
|
||||
"address": "AB1A",
|
||||
"status": "online"
|
||||
},
|
||||
"id-0000": {
|
||||
"status": "offline"
|
||||
},
|
||||
"id-5678": {
|
||||
"address": "0000",
|
||||
"status": "online"
|
||||
},
|
||||
"hops": 10,
|
||||
"latency": 1.23
|
||||
},
|
||||
"name": "in",
|
||||
"tags": {
|
||||
"host": "myhost",
|
||||
"type": "diagnostic"
|
||||
},
|
||||
"timestamp": 1666006350
|
||||
}
|
24
plugins/serializers/json/testcases/transformation_batch.conf
Normal file
24
plugins/serializers/json/testcases/transformation_batch.conf
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Example for transforming the output JSON with batch metrics.
|
||||
#
|
||||
# Input:
|
||||
# impression,flagname=F5,host=1cbbb3796fc2,key=12345,platform=Java,sdkver=4.9.1,value=false count_sum=5i 1653643420000000000
|
||||
# expression,flagname=E42,host=klaus,key=67890,platform=Golang,sdkver=1.18.3,value=true count_sum=42i 1653646789000000000
|
||||
|
||||
json_transformation = '''
|
||||
metrics.{
|
||||
"sdkVersion": tags.sdkver,
|
||||
"time": timestamp,
|
||||
"platform": platform,
|
||||
"key": tags.key,
|
||||
"events": [
|
||||
{
|
||||
"time": timestamp,
|
||||
"flag": tags.flagname,
|
||||
"experimentVersion": 0,
|
||||
"value": tags.value,
|
||||
"type": $uppercase(name),
|
||||
"count": fields.count_sum
|
||||
}
|
||||
]
|
||||
}
|
||||
'''
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{
|
||||
"sdkVersion": "4.9.1",
|
||||
"time": 1653643420,
|
||||
"key": "12345",
|
||||
"events": [
|
||||
{
|
||||
"time": 1653643420,
|
||||
"flag": "F5",
|
||||
"experimentVersion": 0,
|
||||
"value": "false",
|
||||
"type": "IMPRESSION",
|
||||
"count": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"sdkVersion": "1.18.3",
|
||||
"time": 1653646789,
|
||||
"key": "67890",
|
||||
"events": [
|
||||
{
|
||||
"time": 1653646789,
|
||||
"flag": "E42",
|
||||
"experimentVersion": 0,
|
||||
"value": "true",
|
||||
"type": "EXPRESSION",
|
||||
"count": 42
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,24 @@
|
|||
# Example for transforming the output JSON in non-batch mode.
|
||||
#
|
||||
# Input:
|
||||
# impression,flagname=F5,host=1cbbb3796fc2,key=12345,platform=Java,sdkver=4.9.1,value=false count_sum=5i 1653643420000000000
|
||||
# expression,flagname=E42,host=klaus,key=67890,platform=Golang,sdkver=1.18.3,value=true count_sum=42i 1653646789000000000
|
||||
|
||||
json_transformation = '''
|
||||
{
|
||||
"sdkVersion": tags.sdkver,
|
||||
"time": timestamp,
|
||||
"platform": platform,
|
||||
"key": tags.key,
|
||||
"events": [
|
||||
{
|
||||
"time": timestamp,
|
||||
"flag": tags.flagname,
|
||||
"experimentVersion": 0,
|
||||
"value": tags.value,
|
||||
"type": $uppercase(name),
|
||||
"count": fields.count_sum
|
||||
}
|
||||
]
|
||||
}
|
||||
'''
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{
|
||||
"sdkVersion": "4.9.1",
|
||||
"time": 1653643420,
|
||||
"key": "12345",
|
||||
"events": [
|
||||
{
|
||||
"time": 1653643420,
|
||||
"flag": "F5",
|
||||
"experimentVersion": 0,
|
||||
"value": "false",
|
||||
"type": "IMPRESSION",
|
||||
"count": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"sdkVersion": "1.18.3",
|
||||
"time": 1653646789,
|
||||
"key": "67890",
|
||||
"events": [
|
||||
{
|
||||
"time": 1653646789,
|
||||
"flag": "E42",
|
||||
"experimentVersion": 0,
|
||||
"value": "true",
|
||||
"type": "EXPRESSION",
|
||||
"count": 42
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue