HTTP JSON.md
使用htpjson
输入从带有JSON payloads的HTTP API读取消息。
This input supports:
- Auth
- Basic
- OAuth2
- Retrieval at a configurable interval:以可配置的间隔检索
- Pagination:分页
- Retries:重试
- Rate limiting:速率限制
- Proxying:代理
- Request transformations:请求转换
- Response transformations:响应转换
示例配置:
此外,它还支持通过Basic auth、HTTP Headers或oauth2进行身份验证。
Example configurations with authentication:
输入状态
httpjson
输入在请求之间保持运行时状态。可以通过一些配置选项和转换访问此状态。
状态有以下要素:
last_response.url.value
:The full URL with params and fragments from the last request with a successful response.last_response.url.params
:Aurl.Values
of the params from the URL inlast_response.url.value
. Can be queried with theGet
function.last_response.header
:A map containing the headers from the last successful response.last_response.body
:A map containing the parsed JSON body from the last successful response. This is the response as it comes from the remote server.last_response.page
:A number indicating the page number of the last response. It starts with the value0
at every interval.first_event
:A map representing the first event sent to the output (result from applying transforms tolast_response.body
).last_event
:A map representing the last event of the current request in the requests chain (result from applying transforms tolast_response.body
).url
:The last requested URL as a rawurl.URL
Go type.header
:A map containing the headers. References the next request headers when used inrequest.rate_limit.early_limit
orresponse.pagination
configuration sections, and to the last response headers when used inresponse.transforms
,response.split
, orrequest.rate_limit.limit
configuration sections.body
:A map containing the body. References the next request body when used inrequest.rate_limit.early_limit
orresponse.pagination
configuration sections, and to the last response body when used inresponse.transforms
orresponse.split
configuration sections.cursor
:A map containing any data the user configured to be stored between restarts (Seecursor
).
除了cursor
,所有提到的对象仅在运行时存储,它的值在重新启动之间保持不变。
。。。
HTTP JSON.md
http://blog.lujinkai.cn/运维/ELK/filebeats/配置/inputs/HTTP JSON/