Skip to content
Smarter by Design.Simpler for Business

TR7 JSON Format (L7 TCP) ​

About the Format ​

TR7 JSON Format is the most comprehensive log format for the L7 TCP vServices. It takes place in the Line Format list in the profile form with the TR7 JSON Format option. It presents the connection information, the timing metrics and the SSL/TLS details in the structured JSON format.

Unlike the HTTP JSON format, the TCP JSON format provides details at the connection level instead of the request/response content. The WAF information is not supported for TCP.

Use cases

  • Detailed connection analysis.
  • Elasticsearch/Kibana integration.
  • Performance monitoring and optimization.
  • SSL/TLS security analysis.

Supported Features ​

HTTP vService
L7 TCP vService
WAF Information
SSL Information (frontend + backend)

Example Log ​

json
{
  "pool": "LOGTEST-T",
  "ident": "tr7",
  "ts": "09/Sep/2026:20:51:45 +0300",
  "time": {
    "tw": "5",
    "tc": "0",
    "tt": "6088"
  },
  "conn": {
    "act": "1",
    "f": "1",
    "b": "0",
    "s": "0"
  },
  "queue": {
    "b": "0",
    "s": "0"
  },
  "tstate": "cD",
  "retries": "0",
  "network": {
    "ci": "172.16.101.42",
    "cp": "50069",
    "fi": "172.16.102.85",
    "fp": "8080",
    "si": "172.16.102.168",
    "sp": "80"
  },
  "ssl": {
    "fAlgKeysize": "128",
    "fCipher": "TLS_AES_128_GCM_SHA256",
    "fProtocol": "TLSv1.3",
    "fNpn": "-",
    "fAlpn": "http/1.1",
    "fKeyAlg": "rsaEncryption",
    "fSigAlg": "RSA-SHA256",
    "fVersion": "3",
    "fNotAfter": "240507115021Z",
    "fNotBefore": "230508115021Z",
    "fClientDn": "/C=TR/ST=ANK/L=ANK/O=TR7/OU=TR7/CN=new.tr7.com",
    "fIssuerDn": "/C=TR/ST=ANK/L=ANK/O=TR7/OU=TR7/CN=new.tr7.com",
    "sAlgKeysize": "-",
    "sCipher": "-",
    "sProtocol": "-",
    "sNpn": "-",
    "sAlpn": "-",
    "sKeyAlg": "-",
    "sSigAlg": "-",
    "sVersion": "-",
    "sNotAfter": "-",
    "sNotBefore": "-",
    "sClientDn": "-",
    "sIssuerDn": "-"
  },
  "ids": {
    "p": "lbPools-mtue68on__lb",
    "b": "DBE",
    "f": "DFE~",
    "s": "lbBackends-mrdk4wpm"
  },
  "bytes": {
    "uploaded": "4914",
    "read": "7552"
  }
}

Field Descriptions ​

Basic Fields ​

FieldExampleDescription
poolLOGTEST-TThe vService name
identtr7The log source identifier
ts09/Sep/2026:20:51:45 +0300The timestamp (the local time of the device)

time (Timing Metrics) ​

FieldUnitDescription
twmsWait Time: the waiting time in the queue
tcmsConnect Time: the time to connect to the Backend Service
ttmsTotal Time: the total connection time

INFO

The missing fields compared to the HTTP format are not only these: in the time object the tq and tr and, at the top level, the username, request, response, resFrom, isWafAttack and wafInfo fields are not present in TCP. In addition, tstate is four characters in HTTP and two characters in TCP (the cookie state is not carried).

conn (Connection Counters) ​

FieldDescription
actThe number of active connections
fThe number of Frontend connections
bThe number of Backend connections
sThe number of Server connections

queue (Queue State) ​

FieldDescription
bThe number of connections in the Backend queue
sThe number of connections in the Server queue

tstate (Connection Termination State) ​

The 2-character connection termination code:

ValueMeaning
--Normal completion
cDA client-side timeout in the data phase
sDA server-side timeout in the data phase
CDThe client cut the connection in the data phase
SDThe server cut the connection in the data phase

The first character shows the reason for the termination and the second character the phase at the moment of the termination; the full list of the codes is on the Standard (L7 TCP) page.

retries ​

FieldDescription
retriesThe number of Backend connection retries

network (Network Information) ​

FieldExampleDescription
ci172.16.101.42The client IP address
cp50069The client source port
fi172.16.102.85The Frontend (vService) IP address
fp8080The Frontend port
si172.16.102.168The Backend Service IP address
sp80The Backend Service port

The ssl Object: Frontend SSL/TLS Information ​

FieldExampleDescription
fAlgKeysize128The encryption key size (bits)
fCipherTLS_AES_128_GCM_SHA256The cipher suite
fProtocolTLSv1.3The TLS protocol version
fNpn-The NPN protocol
fAlpnhttp/1.1The ALPN protocol
fKeyAlgrsaEncryptionThe key algorithm
fSigAlgRSA-SHA256The signature algorithm
fVersion3The certificate version
fNotAfter240507115021ZThe certificate end date
fNotBefore230508115021ZThe certificate start date
fClientDn/C=TR/ST=ANK/L=ANK/O=TR7/OU=TR7/CN=new.tr7.comThe certificate subject DN
fIssuerDn/C=TR/ST=ANK/L=ANK/O=TR7/OU=TR7/CN=new.tr7.comThe certificate issuer DN

The ssl Object: Backend Service SSL/TLS Information ​

FieldDescription
sAlgKeysizeThe key size (bits)
sCipherThe cipher suite
sProtocolThe TLS protocol version
sNpnThe NPN protocol
sAlpnThe ALPN protocol
sKeyAlgThe key algorithm
sSigAlgThe signature algorithm
sVersionThe certificate version
sNotAfterThe certificate end date
sNotBeforeThe certificate start date
sClientDnThe certificate subject DN
sIssuerDnThe certificate issuer DN

INFO

When the connection to the Backend Service is made unencrypted, all the s* fields take the value -; the example log above is in this situation.

ids (Identifiers) ​

FieldExampleDescription
plbPools-mtue68on__lbThe name of the load balancing container: <vService ID>__lb. The raw vService ID is this value with its __lb suffix dropped.
bDBEThe Backend identifier
fDFE~The Frontend identifier. The ~ sign at the end shows that the connection was terminated with TLS; on an unencrypted frontend it is written as DFE.
slbBackends-mrdk4wpmThe Backend Service ID

bytes (Data Transfer) ​

FieldExampleDescription
uploaded4914The bytes received from the client
read7552The bytes sent to the client

Use Example: Performance Analysis ​

Finding the Slow Connections ​

The examples assume a raw log line

The commands below assume that the file consists of the raw log lines. If local (default), rfc3164, rfc5424 or priority is selected as the Log Standard in the log profile, a syslog prefix is added to the beginning of every line; the field indexes shift and the JSON lines cannot be parsed. In this case, either the collector must strip the prefix or raw must be selected in the profile.

bash
# Total time > 5 seconds
cat tcp.log | jq 'select((.time.tt | tonumber) > 5000)'

Connection Error Rate ​

bash
# Count the terminations that are not normal
cat tcp.log | jq -r '.tstate' | grep -v "^--$" | wc -l

INFO

cD (the client remained idle and hit the timeout) is a usual termination on the long-lived connections and it looks like an error in this count. For the real connection errors, the SC and sC codes must also be filtered.

Backend Service Distribution ​

bash
# The number of connections on a Backend Service basis
cat tcp.log | jq -r '.network.si' | sort | uniq -c | sort -rn

SSL Protocol Distribution ​

bash
# The TLS versions used
cat tcp.log | jq -r '.ssl.fProtocol' | sort | uniq -c