Stream types
Through stream types, you can configure the type of content delivered by the data stream. Depending on your subscription, you may choose between receiving event data, usage data, or Flow Logs (flow data).
Streaming event and usage data within one stream is possible but not advised, as these data records don’t share a common schema definition.
Event data
The emnify system generates several types of events. These events allow you to track notable system occurrences based on behavior.
Some common use cases for events on emnify include:
- Triggers for custom business processes (for example, authentication or custom usage limitations configured on the emnify Portal)
- Monitoring (for example, SIM or data connection lifecycles)
- Input for custom billing systems (that is, updating billing configuration, processing invoices, etc.)
Learn more about the available event types and how to use them in the Event documentation.
Usage data
Usage data records get generated when devices consume data or SMS services. These records provide information about the SIM, used service, visited network, volumes, and cost.
Usage data streams are often used for monitoring and analyzing data consumption and as input for custom billing systems.
Each usage data record contains information about the:
- Device (organization, SIM, IMSI)
- Time (start and end time)
- Price applied for rating (data plan, coverage policy, coverage area)
- Mobile network operator used for the service (operator, country)
- Type of service (SMS or data)
- Consumed service volumes (down- and upstream, total volume)
- Costs (amount, currency)
Traffic types
Data
Data usage records are created:
- Every 45 seconds for open PDP contexts (when at least 100 KB of data is consumed)
- After the PDP context is closed
Example JSON response
API reference
SMS
Usage records for SMS are created when an SMS is successfully delivered either:
- From the device (
"rx": 1) - Towards the device (
"tx": 1)
Example JSON response
API reference
Flow Logs (flow data) Beta
Flow Logs (also referred to as flow data) capture metadata about IP traffic generated by devices across emnify’s mobile core. Use them for observability, security, troubleshooting, and compliance use cases.
Flow Logs streaming is in beta. Flow Logs are available for all Data Streamer integrations except Keen and Datadog, where they’re disabled.
The Flow Logs stream contains enriched flow records, including:
- Flow metadata - 5-tuple, protocol, direction, timestamps, bytes up/down, and NAT context where applicable
- Domain attribution - DNS answers and server name observations such as TLS SNI or HTTP Host, where enrichment is possible
- Device and network context - organization, endpoint, APN, MCC/MNC, country, and session metadata where available
Flow Log records are emitted at stages of a flow’s lifecycle, indicated by the event_type field:
flow_start- first record emitted when a new flow is observedflow_update- periodic snapshot of an active flowflow_end- final record emitted when the flow terminates, including release details
Learn more about the available flow data event types in the Network Flow Logs documentation.
Configuration
Flow Logs currently provide a single canonical stream without selectable event filtering or stream options.
The stream includes a buffering window to bridge short interruptions, such as temporary outages or pauses.