Comments (3)
Hi - any progress on this ? I am also facing this issue.
from logstash-filter-http.
Found a workaround, Use below in the filters to have event into a given field
ruby {
code => "
# Move everything to request
event.set('request', event.to_hash)
"
}
and then pass, body => "%{request}"
from logstash-filter-http.
It would be really nice if some example documentation could be added, both in the README which doesn't even link to the plugin page or call the filter the HTTP filter and the actual documentation.
# Way to set the entire body from the outside
mutate {
add_field => {
"[cm][request][body]" => '{"data":{"nodeId":4,"dateFrom":"%{[datetime]}","kind":"compute"}}'
}
}
...
body_format => "text"
body => "%{[cm][request][body]}"
# Way to set the body from the inside while keeping some things modular
body_format => "json"
body => {
"data" => {
"nodeId" => 4
"%{[cm][date_name]}" => "%{[datetime]}"
"kind" => "compute"
"isSuccess" => true
}
}
There is no way to set up the body from a previously existing hash. (outside of hacks with ruby code)
# This block won't work
add_field => {
"[cm][request][body]" => {
"data" => {
"nodeId" => 4
"dateTo" => "%{[datetime]}"
"kind" => "compute"
"isSuccess" => true
}
}
}
...
body_format => "json"
# This will just set the string "[cm][request][body]"
body => "[cm][request][body]"
# This will just pass the raw Hash, not parsed JSON
body => "${[cm][request][body]}"
from logstash-filter-http.
Related Issues (20)
- Implement native caching for higher scale lookups HOT 4
- Debug message causes Fatal error HOT 2
- Add ability to disable SSL certificate validation HOT 4
- Cannot send Content-Type header HOT 6
- Documentation Mismatch HOT 1
- Unhelpful error message when body is hash and body_format is text
- Unable to parse Json with one field or none + needed clarity on target_body parameter
- Implement ECS-Compatibility Mode
- Authentication username and password are not interpolated
- Plugin crashes on empty response body HOT 9
- Is it possible to do PUT requests from this plugin HOT 1
- Friendlier handling of non 200 response codes HOT 2
- tag_on_request_failure and tag_on_json_failure are not documented
- Handle Empty body in HTTP response HOT 1
- Doesn't respect quoted characters HOT 3
- Plugin crashes when it receives Array type of content-type header.
- Need clarification on sending data as json
- Some APIs allow for batch processing, how can we provide batch support?
- Add support to extract a value from the response.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstash-filter-http.