Udp broadcasting for Good process monitor
The versions 4 of this module can be used with Good 7.
For use with previous versions of Good, please refer to older versions.
Lead Maintainer: Vladimir de Turckheim
good-udp is a write stream use to send event to remote endpoints in batches. It makes a request with a JSON payload to the supplied
endpoint. It will make a final request to the endpoint to flush the rest of the data on "finish".
good-udp will never close the udp client.
GoodUdp (endpoint, config)
creates a new GoodUdp object with the following arguments
endpoint- full path to remote server to transmit logs.
config- configuration object
[threshold]- number of events to hold before transmission. Defaults to
20. Set to
0to have every event start transmission instantly. It is strongly suggested to have a set threshold to make data transmission more efficient.
[udpType]- a string with the type of udp you want to use. Valid options are udp4 or udp6. Defaults to
stream emits an "end" event,
goodudp will transmit any events remaining it it's internal buffer to attempt to prevent data loss.
Each request will match the following schema. Every event will be wrapped inside the
events key and grouped by the event type and ordered by the timestamp. The payload that is sent to the
endpoint has the following schema: