Skip to content

Traffic log Since v0.2 ​

The traffic log records one entry per request, whether it was allowed or not. Each entry joins two halves by the request ID. The inspection half holds the application, virtual server, VIP, client, request headers and body, user, bot class, verdict, every module's decision and time, and the response inspection saw. The data plane half holds the VIP and port reached, TLS version, cipher and server name, server pool and the member that served it, connect, first-byte and total times, attempts, response flags, status and bytes.

The records live in the node's own file traffic.db in the data directory. It is not part of backups, and the control process and inspection service of a node must share that directory.

Before you begin ​

  • Role: viewer reads (with masked values). operator and admin read values as stored. Settings need operator with access to every application.
  • Each node keeps its own file. There are no queries across nodes, so a pair answers from the node you are connected to.

Read the traffic log ​

text
1. Open Monitor > Traffic log.
2. Narrow the list with Search traffic, Application, Client IP, Method, Host, Path starts with,
   Status, Action, VIP, Virtual server and Pool member, and the time range.
3. Select Show more to load the next page, or turn on Follow live to add new requests at the top.
4. Open a record to see the request flow and the full request and response.
sh
waap traffic list -app shop -status 502 -since 1h
waap traffic show REQUEST-ID
waap traffic export -app shop -since 24h -max 50000
text
GET /v1/traffic
GET /v1/traffic/{id}
POST /v1/traffic/export

Follow live polls every few seconds and is off by default. Export downloads the matching records as JSON lines. Exports are audited, default to 10,000 records and are capped at 100,000. For a filter language shared with events and analytics, see The explorer.

Read the request flow ​

A traffic record and a security event both show the request from top to bottom.

  1. Client: address and port, country, user agent, user, bot class, TLS version, cipher and server name, HTTP version.
  2. Entry: VIP, virtual server (address, port, protocol), matched host and the application chosen.
  3. WAF request side: every module in order with its decision, time, matches and changes.
  4. Verdict: action and reasons. A blocked request ends with the block page returned. In detect mode it says "would have blocked" and the flow goes on.
  5. Sent to: server pool, the member chosen, connect time and attempts.
  6. Backend reply: status, headers, size and time to the first byte.
  7. WAF response side: response modules (data leak masking, header hardening, cookie protection) and their changes.
  8. Back to client: final status, bytes sent and total time.

Parts that were not captured say why. The upstream start time includes the time the request waited for inspection. A request that matched no route has no inspection half and is recorded as partial (missing inspection). If the data plane's half does not arrive within 30 seconds, the record is written as partial (missing data_plane).

The event detail page links to its traffic record. Events also get the data plane half when traffic logging is off, because the control plane adds it to the stored event. That part is not copied to a high-availability peer and is usually absent from SIEM messages, which are exported as soon as the event is stored.

Choose what is recorded ​

text
1. Open System > Settings > Traffic log.
2. Set Requests recorded, Sample rate, Retention, Most records kept, Most traffic storage,
   Request body kept per record and Record response bodies.
3. Select Preview changes, then Apply.
4. To change one application, open Applications > All applications > app > Request checks >
   Logging and set Traffic log.
sh
waap settings set traffic -m "sample the traffic log" mode=sample sample_rate=10
waap apps set -app shop -m "log all of shop" policy.logging.traffic=all
yaml
traffic:
  mode: sample
  sample_rate: 10
  retention: 168h
applications:
  - name: shop
    policy:
      logging:
        traffic: all

A response body is present only when inspection received it. Otherwise the record says why: logging off, the response was outside the response scope, answered by the product itself, or the content encoding is not decoded.

Settings reference ​

Traffic log (global) ​

SettingWhat it doesDefaultAllowed valuesApplies in
Requests recorded (traffic.mode)Which requests are recorded. sample is chosen by request ID, so every node decides alike.allall, sample, offglobal; an application may override it
Sample rate (traffic.sample_rate)Percentage recorded.101 to 100mode sample
Retention (traffic.retention)Older records are deleted.168h (7 days)duration, at least 1hall
Most records kept (traffic.max_records)The oldest records beyond this are deleted.50000000at least 1000all
Most traffic storage (traffic.max_bytes)The oldest records beyond this total size are deleted.5 GiBat least 1 MiBall
Request body kept per record (traffic.body)Request body bytes kept per record.empty: each application's inspection body limitsize; 0 keeps noneall
Record response bodies (traffic.response_body)Ask inspection for response bodies of every application. Costs latency.falsetrue, falseall

Per application ​

SettingWhat it doesDefaultAllowed valuesApplies in
Traffic log (policy.logging.traffic)Overrides the global mode for this application.inheritinherit, all, sample, offthe application
Record response bodies (policy.logging.response_body)Record this application's response bodies.falsetrue, falsethe application

Limits ​

LimitValue
Exportdefault 10,000 records, at most 100,000
Page size of waap traffic listdefault 20, at most 1000
Wait for the missing half of a record30 seconds
Storageper node; the file does not shrink when old records are deleted (SQLite reuses the space)

Records are written in batches off the request path. When the queue is full they are dropped and counted, and a request is never delayed. The counters are waap_traffic_records_written_total, waap_traffic_records_dropped_total and waap_traffic_records_partial_total.

Troubleshooting ​

Records are marked partial ​

  • Cause: a request that matched no route has no inspection half, or the data plane half did not arrive within 30 seconds.
  • Check: the record's missing value (inspection or data_plane) and waap_traffic_records_partial_total.
  • Fix: for data_plane, check that the access-log socket between Envoy and the inspection service is up. A rising dropped counter means the write queue is full: lower the sample rate.

The log has fewer records than requests ​

  • Cause: mode is sample or off, an application overrides it, or records were dropped.
  • Check: System > Settings > Traffic log, the application's Logging page, and waap_traffic_records_dropped_total.
  • Fix: set the mode to all, or lower the load.