Data Stream
Send the event logs of your account and its traffic, in batches, to a SIEM, a data warehouse, or a stream processor you run.
Data Stream is a Platform Resource that sends the event logs of your account and its traffic to an endpoint you choose. A log stream is a feed of log records, pushed to a tool you run, such as a security information and event management (SIEM) system. Use Data Stream to feed WAF events to a SIEM, keep request logs in a data warehouse, audit account changes, or debug your Functions.
Each stream in Data Stream combines one of each of these parts:
- Data sources let you pick the events a stream collects: changes to your account, requests to your Applications, messages your Functions log, or requests that WAF analyzed. WAF Events needs a Firewall with WAF, and each data source offers its own variables.
- Templates set which variables each log line carries and under which keys. Azion provides five preset templates, and you write a custom template to choose your own variables.
- Endpoints set where a stream delivers its log lines, such as an HTTP server or a bucket. A stream sends to one endpoint of any of the 11 types, so sending the same events to two endpoints takes two streams.
Event path
A stream does not send each event as it happens: it renders events as log lines and sends them to its endpoint in batches.
Saving a stream as active is the only activation step it needs. After you create or activate a stream, it can take several minutes to start collecting events. It does not send the events from before that.
Thick arrows carry the stream’s data, and the dotted arrow carries the endpoint’s answer. Each label starts with the number of its step below.
- The data source records an event, and the stream keeps the event when it falls inside the stream’s sampling rate or workload filter.
- The template turns the event into one log line, where each key takes the value of a variable from the template’s data set, such as
"status": "$status". - The log line joins a batch, which closes at a line count or at a time limit, whichever comes first, per Data Stream limits.
- The stream sends the batch to the endpoint, and the endpoint answers with an HTTP status. When the endpoint is unavailable or answers with an error, the log lines of that send do not reach it.
- Real-Time Events records the send with a status code, its number of log lines, and its size in bytes.
Saving a stream validates the format of its fields and does not contact the endpoint. The first send records in Real-Time Events show whether the endpoint accepts the batches. For each stage in depth, refer to How Data Stream works.