6.1.3 • Published 6 years ago
good-http-elastic v6.1.3
good-http-elastic
Http(s) broadcasting for Good process monitor
Lead Maintainer: Maxime Wimez
Usage
good-http-elastic
is a write stream use to send event to remote endpoints in batches. It makes a "POST" request with a JSON payload to the supplied endpoint
. It will make a final "POST" request to the endpoint to flush the rest of the data on "finish".
Good Http
GoodHttp (endpoint, config)
Creates a new GoodHttp object where:
endpoint
- full path to remote server to transmit logs.config
- configuration object[threshold]
- number of events to hold before transmission. Need to be0
.[errorThreshold]
- number of consecutive failed transmissions allowed (ECONNRESET
,ECONNREFUSED
, etc). Defaults to0
. Failed events will be included in the next transmission until they are successfully logged or the threshold is reached (whichever comes first) at which point they will be cleared. Set tonull
to ignore all errors and always clear events.[wreck]
- configuration object to pass intowreck
. Defaults to{ timeout: 60000, headers: {} }
.content-type
is always "application/json".
Schema
Each POST will match the following schema. The payload that is POSTed to the endpoint
has the following schema:
{
"host":"servername.home",
"event":"request",
"timestamp":1413464014739,
...
}
6.1.3
6 years ago