Skip to content

Durable Telemetry Delivery

Durable telemetry delivery is a mode of the native Endpoint Agent (Windows, Linux and macOS). In this mode the sensor keeps a bounded, in-memory copy of the telemetry it sent until LimaCharlie confirms that the telemetry is stored. If the confirmation does not arrive, for example because a LimaCharlie endpoint server was lost, the sensor sends the telemetry again.

What It Protects Against

Without this mode, a sensor discards telemetry as soon as it has been written to its connection to the cloud. LimaCharlie then stores that telemetry in batches, which takes a couple of minutes. If the LimaCharlie endpoint server that received the telemetry dies during that time, for example because it crashes or its machine is lost, the telemetry it had not yet stored is lost.

Durable delivery removes that loss window: the sensor keeps what it sent until LimaCharlie confirms that the telemetry is stored, and sends it again if the confirmation does not come. It does this within the limits listed under What It Does Not Cover.

Availability

The mode is turned on per organization by LimaCharlie. There is nothing to configure on the sensor and no setting in the web application.

It also needs a sensor version that supports it. Support is part of an upcoming sensor release; the release notes will list the first version that has it. Sensors that do not support it keep working exactly as before, and sensors that do support it stay idle until the mode is on for the organization.

When the mode is turned off for an organization, its sensors leave it within about five minutes, which is the interval at which sensors report their state.

At-Least-Once Delivery

With durable delivery, an event that the sensor sent reaches LimaCharlie at least once, within the limits listed under What It Does Not Cover. This is not exactly once: after a sensor reconnects or a LimaCharlie endpoint server is lost, the sensor sends again what was not yet confirmed, and some of it may already have been stored. In that case the same event is received twice.

LimaCharlie asks the sensor to send its unconfirmed telemetry again each time the sensor starts a new session with it. To make this visible, an event that the sensor sent again at that request carries routing.replayed set to true, and it receives a new routing.event_id. Events that were not sent again do not carry the field at all. A replayed event is either a repeat of an event you already have or the only copy, if the original was lost.

{
  "routing": {
    "event_type": "NEW_PROCESS",
    "event_time": 1656959942437,
    "event_id": "5f0c3a9e-6f0e-4d3e-9a43-4a8d7f2b1c10",
    "sid": "bb4b30af-aaaa-aaaa-aaaa-f014ada33345",
    "hostname": "workstation-01",
    "replayed": true
  },
  "event": {
    "FILE_PATH": "C:\\Windows\\System32\\cmd.exe",
    "COMMAND_LINE": "cmd.exe /c whoami"
  }
}

The field is documented with the other fields in The routing Section.

No indicator that the mode is on

The only sign of the mode in your data is the routing.replayed field on events that were sent again. Replays are rare, so the absence of the field does not show that the mode is off.

What Changes for Detections and Outputs

A replayed event is processed like any other event:

  • Detection and Response rules run on it. A rule that matched the original event can match the replayed one, so the same detection can fire a second time. This is most likely when a LimaCharlie endpoint server was lost abruptly: it had already run the rules on the events it received, and the rules run again on the replay. A replay can also be the only copy that reaches LimaCharlie, in which case it produces a detection that would otherwise have been missed. The detection created from a replayed event carries routing.replayed too, so you can tell it apart.
  • Outputs (webhook, S3, and so on) receive the replayed event as well, so the receiving system can see the same activity twice.
  • Event IDs: because a replayed event has a new routing.event_id, you cannot detect duplicates by comparing event IDs.

Excluding Replayed Events in a D&R Rule

A replayed event has routing/replayed set to true. Events that are not replays do not have the field, so an is check on it does not match them.

To keep an existing rule from firing a second time on a replayed event, add a negated is check on routing/replayed:

detect:
  event: NEW_PROCESS
  op: and
  rules:
    - op: ends with
      path: event/FILE_PATH
      value: cmd.exe
    - op: is
      not: true
      path: routing/replayed
      value: true
respond:
  - action: report
    name: cmd-exe-launched

Think before adding this check to every rule. If the original copy of an event was lost with a failed cloud node, the replayed copy is the only one, and a rule that ignores replays does not fire on it. Excluding replays suits rules whose response is not safe to repeat, or whose duplicate alerts are costly.

To match only replayed events, for example to count them or to review what was sent again, use:

detect:
  event: NEW_PROCESS
  op: is
  path: routing/replayed
  value: true
respond:
  - action: report
    name: replayed-event-seen

The same condition works with the exists operator on routing/replayed. See Detection Logic Operators for the operators and Response Actions for actions such as suppression.

Outputs

The documented output filters are by event type, sensor tag and detection category (see Filtering and Transforming Streams). There is no output filter on a field such as routing.replayed. If the system that receives the data should ignore replays, filter on routing.replayed in that system. An event with "replayed": true may be a repeat of one you already received, or the only copy if the original was lost, so dropping replays trades duplicates for possible loss. Events without the field were not sent again.

What It Does Not Cover

  • Sensor restart or host crash. The copy the sensor keeps is in memory, not on disk. If the sensor process or the host stops, the copy is gone.
  • Very high telemetry rates. The copy is bounded (see below). A sensor that produces more telemetry than the bound can hold while it waits for a confirmation releases its oldest copies, and those are no longer protected. Behavior for them is the same as without the mode.
  • LimaCharlie not answering. If the sensor receives no message from LimaCharlie for 10 minutes after it sent telemetry in this mode, it releases its copy and leaves the mode until LimaCharlie turns it on again.
  • Delivery to your own outputs. Only the telemetry LimaCharlie stores for your organization is confirmed. LimaCharlie does not wait for, or confirm, delivery to a webhook, a storage bucket or any other output you configured.
  • Telemetry sent before the mode is on. After a sensor starts, the first telemetry it sends before the cloud enables the mode is not protected.

Sensor Resource Use

By default, the sensor keeps at most 100,000 events or 24 MiB (estimated size) of recently sent telemetry, whichever comes first. The copy is held in memory and has a limit of its own, separate from the queue of telemetry waiting to be sent, which keeps its usual limits. A sensor that sends little telemetry typically holds little: the copy only has to cover the time until LimaCharlie confirms the storage, a couple of minutes.

The memory the copy uses is larger than the estimated size. In the worst case, a sensor that sends a very large number of small events can use about 100 MB of additional memory. Plan for that on hosts with little memory.

Questions

Will I see duplicates all the time? No. Replays happen after a sensor reconnects or a cloud node is lost, and most events are never replayed.

Does it change what is stored or how long it is kept? No. Retention settings are unchanged. The differences are the possible duplicates and the routing.replayed field on events that were sent again.

What happens to a sensor that does not support it? Nothing. It keeps working as before, and nothing is sent to it.