lb log
The lb log command creates the log profiles that determine where and in which format the traffic logs of a vService will be sent. When the profile is bound to a vService, the logs of that service start flowing to the stated servers. Its panel equivalent is the Logging section.
Command Summary
Writing Order
lb log add traffic-log--logAddresses.0.ip.ip 10.0.50.10 --logAddresses.0.ip.port 514--lineFormat tr7json --logStandard rfc5424lb service update id <vService> --log <profile>Required Fields
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | name | Required | The name of the profile; it must be unique in the collection |
The Log Servers
Every server is written with its own index. There can be at least one and at most ten servers in the list.
| Field | What it does | What is written after it |
|---|---|---|
--logAddresses.N.ip.ip | Determines the address of the server to which the logs will be sent | An IP address |
--logAddresses.N.ip.port | Determines the port of the server | A port (default 514) |
--logAddresses.N.sampling | Thins out the sent logs; when a value is given, the logs are sampled at this rate | An integer between 1 and 524288. When it is left empty, all the logs are sent |
The Format Fields
| Field | What it does | What is written after it |
|---|---|---|
--logStandard | Selects with which sending standard the log will be packaged | local (default) · rfc3164 · rfc5424 · priority · raw |
--lineFormat | Selects the format of the log line | apache (the standard log format) · apache-combined · apache-vhost · cef · tr7json · tr7waf · manualJSON · manualCEF · manual |
--manualLineFormat | Writes the line format by hand from start to end | A smart content expression; it opens and becomes required only when --lineFormat manual is selected |
--manualLogEntries.N.key | Determines the name of the field to be added to the log | A field name; unique within the profile. It opens only when --lineFormat manualJSON or manualCEF is selected |
--manualLogEntries.N.value | Determines the value of that field | A smart variable; Tab lists the usable ones |
The three manual writing formats are separate from each other
In the manual format the whole line is written with --manualLineFormat. In the manualJSON and manualCEF formats the skeleton of the line is ready; the fields to be put inside it are added with the --manualLogEntries.N pairs.
Examples
Updating and Deleting
Things to Know
- A profile does not work on its own. The log sending starts when the profile is bound to a vService with the
--logfield. - The number of servers is limited. There can be at least one and at most ten log servers in the list.
- Sampling means log loss. When
--logAddresses.N.samplingis given, the logs are sent thinned out; in the places where a complete record is needed it is left empty. - The manually written fields carry smart variables. The values written in the
--manualLogEntries.N.valuefield can be variables resolved from the request. - The name is unique. A second profile with the same name cannot be created.
