Smarter by Design.Simpler for Business
lb report
The lb report command creates the report profiles that determine what the report produced from the traffic of a vService will contain. The profile carries which sections will be reported, how many lines will be shown and whether the report will be sent by email or not. Its panel equivalent is the Reports screen.
Command Summary
# Tab after the command
admin@TR7LBWAF01> lb report
add delete list show update
admin@TR7LBWAF01> lb report list # list all of them
admin@TR7LBWAF01> lb report show <id> # show one
admin@TR7LBWAF01> lb report add name <name> xlsxMaxLines <n> pdfMaxLines <n>
admin@TR7LBWAF01> lb report update id <id> … # change
admin@TR7LBWAF01> lb report delete <id> # delete
admin@TR7LBWAF01>
Required Fields
| Order | Field | Status | What it does | What is written after it |
|---|---|---|---|---|
| 1 | name | Required | Gives a name to the profile | The name of the profile; it must be unique in the collection |
| 2 | xlsxMaxLines | Required | Determines at most how many lines the tables in the XLSX output will carry | The number of lines |
| 3 | pdfMaxLines | Required | Determines at most how many lines the tables in the PDF output will carry | The number of lines |
The Report Content
| Field | What it does | What is written after it |
|---|---|---|
--reportDivs.N | Selects which sections will take place in the report | A section value; each with its own index. The values are dayBased · hourBased · h · country · city · continent · asn · ci · host · path · page_404 · page_static · page_1xx · page_2xx · page_3xx · page_4xx · page_5xx · referer · beId · resFrom · os · browser · ua · status · method · v · reqCt · resCt · reqSsl · resSsl · fIpPort |
--pdfGraphDivs.N | Selects which sections will be drawn as a graph in the PDF output | A section value (default v); each with its own index |
--feStats.N | Selects which statistics will be reported from the listening side | A statistic name; Tab lists them |
--beStats.N | Selects which statistics will be reported from the backend side | A statistic name; Tab lists them |
--lang | Determines the language of the report | A language code. When it is left empty, the language of the system is used |
Email Sending
| Field | Status | What it does | What is written after it |
|---|---|---|---|
--emailReport | Optional | Turns on the report being sent by email | true · false (default false) |
--emailAddresses.N | Optional | Determines the addresses to which the report will be sent | An email address; each with its own index |
--emailFileTypes.N | Conditional | Selects the file formats that will be sent | pdf (default) · xlsx; it opens only while --emailReport true |
--emailFrequency.N | Conditional | Selects the sending frequency | daily · weekly · monthly · annual; more than one can be selected. It opens only while --emailReport true |
The Advanced Report Sections
Besides the ready sections, sections whose columns are defined by hand can be added. Every section takes its own index and every column takes its own index.
| Field | What it does | What is written after it |
|---|---|---|
--advancedReportDivs.N.title | Determines the title of the section | The title text |
--advancedReportDivs.N.cond | Determines which traffic will enter the section | A condition expression; it is built from the lb condition records |
--advancedReportDivs.N.columns.M.columnTitle | Determines the title of the column | The column title |
--advancedReportDivs.N.columns.M.columnContent | Determines what will be shown in the column | The column content |
Examples
admin@TR7LBWAF01> lb report add name daily-report xlsxMaxLines 5000 pdfMaxLines 500 \
--reportDivs.0 dayBased --reportDivs.1 country --reportDivs.2 status \
--pdfGraphDivs.0 dayBased
admin@TR7LBWAF01>
# when emailReport is turned on, the format and frequency fields open
admin@TR7LBWAF01> lb report add name weekly-report xlsxMaxLines 10000 pdfMaxLines 1000 \
--emailReport true --emailAddresses.0 yonetim@kurum.com.tr \
--emailFileTypes.0 pdf --emailFileTypes.1 xlsx --emailFrequency.0 weekly
admin@TR7LBWAF01>
admin@TR7LBWAF01> lb report update id <id> \
--advancedReportDivs.0.title "API requests" --advancedReportDivs.0.cond <condition> \
--advancedReportDivs.0.columns.0.columnTitle "Path" --advancedReportDivs.0.columns.0.columnContent <content>
admin@TR7LBWAF01> lb service update id <vService> --reportProfile <profile>
admin@TR7LBWAF01>
Updating and Deleting
admin@TR7LBWAF01> lb report update id <id> --pdfMaxLines 2000
# removing a single section · emptying the section list
admin@TR7LBWAF01> lb report update id <id> --reportDivs.2.delete
admin@TR7LBWAF01> lb report update id <id> --advancedReportDivs.delete
admin@TR7LBWAF01> lb report delete <id>
admin@TR7LBWAF01>
Things to Know
- Both line limits are required. A profile cannot be created without
xlsxMaxLinesandpdfMaxLinesbeing given. - A profile does not work on its own. The reporting starts when the profile is bound to a vService with the
--reportProfilefield; additional profiles are added with--extraReportProfiles.N. - The email fields are conditional.
--emailFileTypesand--emailFrequencyopen only when--emailReport trueis written. - The graphs are selected from the section list. The
--pdfGraphDivs.Nvalues are report section values as well; a section that does not take place in the report is not drawn as a graph either. - The name is unique. A second profile with the same name cannot be created.
