in_http
Input plugin allows you to send events through HTTP requests. Using this plugin, you can trivially launch a REST endpoint to gather data.curl
.time
parameter:@type
(required)http
.port
bind
body_size_limit
keepalive_timeout
add_http_headers
HTTP_
prefix headers to the record.add_remote_addr
REMOTE_ADDR
field to the record. The value of REMOTE_ADDR
is the client's address.X-Forwarded-For
headers in the request, in_http
uses the first one. For example:REMOTE_ADDR
will be host1
.cors_allow_origins
["domain1", "domain2"]
to cors_allow_origins
, in_http
returns 403
to access from other domains. Since Fluentd v1.2.6, you can use a wildcard character *
to allow requests from any origins.cors_allow_credentials
Access-Control-Allow-Credentials
header. It's needed when a request's credentials mode is include
. An example of use case is using Beacon API, its request mode is always include
.respond_with_empty_img
use_204_response
<transport>
Sectionlinger_timeout
SO_LINGER
.0
is to send RST rather than FIN to avoid lots of connections sitting in TIME_WAIT on closing on non-Windows.linger_timeout
is 0
too).<transport tls>
, in_http
uses HTTP.<parse>
directiveformat
(deprecated)<parse>
directive instead.msgpack=
prefix:in_http
plugin recognizes HTTP Content-Type
header in the incoming requests. For example, you can send a JSON payload without the json=
prefix:application/msgpack
:<parse>
directive. For example, add the following settings to the configuration file:csv
/syslog
/nginx
) are also supported. For the full list of supported formats, see Parser Plugin Overview.Content-Encoding
header to your requests.in_http
removes '+' from my log?curl
command example:in_http
support TLS transport. Here is a configuration example with HTTPS client:client_cert_auth
and ca_path
options like this: