Skip to content

Instantly share code, notes, and snippets.

@wpcarro
Created February 13, 2023 19:37
Show Gist options
  • Save wpcarro/87b77a25bc43e346e3764cf9ec0ff9ca to your computer and use it in GitHub Desktop.
Save wpcarro/87b77a25bc43e346e3764cf9ec0ff9ca to your computer and use it in GitHub Desktop.
Troubleshooting benthos
input:
file:
paths:
- /tmp/versions.json
codec: all-bytes
processors:
- jq:
query: '.[] | select( .Name | contains("Needle") ) | {"name": .Name, "key": .Key}'
- unarchive:
format: json_array
- split:
size: 1
pipeline:
processors:
- bloblang: |
root = "https://some.url/" + json("key") + "/bar"
- http:
url: ${! content() }
verb: GET
headers:
Authorization: "Bearer ${OS_TOKEN}"
timeout: 5s
- jq:
query: '{"name": "???", "version": .[0].Version }'
output:
stdout:
codec: lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment