-
input:
label: ""
kafka_franz:
.........
buffer:
none: {}
pipeline:
threads: 2
processors:
- mapping: |
root.src_ip = this.src_ip
- branch:
processors:
- http:
url: "http://xxx.com/api/v1/ipUserQuery?ip=${! root.src_ip }&needIpType=true&needHistory=true&needUserInfo=true" # No default (required)
verb: GET
timeout: 5s
headers:
Accept: "application/json"
result_map: "root.response = this"the input is kafka, kafka result is in root.src_ip = this.src_ip ,I want use kafka input src_ip to get http reqeust${! root.src_ip }。 error is: |
Beta Was this translation helpful? Give feedback.
Answered by
tri0mphe
Apr 2, 2025
Replies: 1 comment
-
|
I have solved the problem pipeline:
threads: 2
processors:
- mapping: |
meta src_ip = this.src_ip
- branch:
request_map: 'root = ""'
processors:
- http:
url: 'http://test.com/api/v1/ipUserQuery?ip=${! meta("src_ip") }&needIpType=true&needHistory=true&needUserInfo=true' # No default (required)
verb: GET
timeout: 5s
headers:
Accept: "application/json"
result_map: "root.response = this"
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tri0mphe
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have solved the problem