Skip to content
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 ​

TR7 WEB-CLI · lb report
# 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 ​

OrderFieldStatusWhat it doesWhat is written after it
1nameRequiredGives a name to the profileThe name of the profile; it must be unique in the collection
2xlsxMaxLinesRequiredDetermines at most how many lines the tables in the XLSX output will carryThe number of lines
3pdfMaxLinesRequiredDetermines at most how many lines the tables in the PDF output will carryThe number of lines

The Report Content ​

FieldWhat it doesWhat is written after it
--reportDivs.NSelects which sections will take place in the reportA 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.NSelects which sections will be drawn as a graph in the PDF outputA section value (default v); each with its own index
--feStats.NSelects which statistics will be reported from the listening sideA statistic name; Tab lists them
--beStats.NSelects which statistics will be reported from the backend sideA statistic name; Tab lists them
--langDetermines the language of the reportA language code. When it is left empty, the language of the system is used

Email Sending ​

FieldStatusWhat it doesWhat is written after it
--emailReportOptionalTurns on the report being sent by emailtrue · false (default false)
--emailAddresses.NOptionalDetermines the addresses to which the report will be sentAn email address; each with its own index
--emailFileTypes.NConditionalSelects the file formats that will be sentpdf (default) · xlsx; it opens only while --emailReport true
--emailFrequency.NConditionalSelects the sending frequencydaily · 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.

FieldWhat it doesWhat is written after it
--advancedReportDivs.N.titleDetermines the title of the sectionThe title text
--advancedReportDivs.N.condDetermines which traffic will enter the sectionA condition expression; it is built from the lb condition records
--advancedReportDivs.N.columns.M.columnTitleDetermines the title of the columnThe column title
--advancedReportDivs.N.columns.M.columnContentDetermines what will be shown in the columnThe column content

Examples ​

TR7 WEB-CLI · A) A daily report profile
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>  
TR7 WEB-CLI · B) Sending by email
# 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>  
TR7 WEB-CLI · C) An advanced section and binding to a vService
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 ​

TR7 WEB-CLI · update and delete
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 xlsxMaxLines and pdfMaxLines being given.
  • A profile does not work on its own. The reporting starts when the profile is bound to a vService with the --reportProfile field; additional profiles are added with --extraReportProfiles.N.
  • The email fields are conditional. --emailFileTypes and --emailFrequency open only when --emailReport true is written.
  • The graphs are selected from the section list. The --pdfGraphDivs.N values 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.