反馈已提交

网络繁忙

You are viewing 5.1 help doc. More details are displayed in the latest help doc.

Platform Log LogDB Database

  • Recent Updates: September 28, 2022
  • I. Overview

    1. Version

    FineBI Version
    5.1


    2. Application scenario

    In order to strengthen the management of the FineBI project and monitor its running status at any time, log recording can be enabled in the platform, as shown in the following figure:

    Note: The settings of the platform log only affect the output of the system log, not the operation log.

    2022-07-13_11-23-00.png


    3. Function introduction

    LogDB is a built-in database used to save logs after FineBI log monitoring is enabled. So what does the FineBI log contain?

    This article will briefly introduce the meaning of each data table in LogDB and the meaning of the fields.

    database LogDB , please refer to: Actual Application Scenario of LogDB.

    II. Connect to the LogDB database

    1. Create a new data connection

    1) Enter the data decision system as an administrator, click "Manage > Data Connection > Data Connection Management > New Data Connection", as shown in the following figure:

    2022-07-13_11-30-31.png

    2) "Others > Other JDBC" as the data connection method, as shown in the following figure:

    2022-07-13_11-33-51.png

    3) Configure the data connection information as shown in the figure below, and click Save .

    配置项内容备注
    数据连接名称LogDB-
    驱动com.fr.swift.jdbc.Driver手动输入驱动器名称
    数据连接 URLjdbc:swift:emb://defaultMac、Windows、Linux 通用

    2022-07-13_11-40-07.png

    2. Query the LogDB data table

    Note: When using the LogDB data table, real-time data is not supported

    1) Enter the data decision system as an administrator, click "Manage>Data Connection>Server Dataset>Create Dataset>SQL Dataset", as shown in the following figure:

    2022-07-13_11-43-30.png

    2) Enter the database query statement and click the Preview button to query the data table in LogDB . As shown below:

    2022-07-13_11-51-34.png

    3. LogDB data tables and fields

     For the meaning of each data table and table field in the Logdb database, see: LogDB Table Structure

    III. Query syntax

    This chapter will briefly introduce the query syntax supported by LogDB . The syntax not listed in this article is not guaranteed to be available.

    1. Detailed query

    SQL statement example:

    1)select * from fine_record_execute

    2)select tname, displayName, consume from fine_record_execute

    2. group by query

    GROUP BY query, there are five aggregation methods of SUM, COUNT, MAX, MIN, AVG.

    If the aggregation method is not written in the SQL statement, COUNT will be used by default.

    SQL statement example:

    1)select sum(consume) from fine_record_execute group by tname, displayName

    2)select consume from fine_record_execute group by tname, displayName

    Equivalent to: select COUNT(consume) from fine_record_execute group by tname, displayName

    3)select min(consume), max(consume) from fine_record_execute group by tname, displayName

    3. where filter condition

    Simple WHERE filter conditions, support AND, OR, =, <>, >, >=, <, <=, in, is null 

    SQL statement example:

    1) select * from fine_record_execute where consume > 10

    2) select sum(consume) from fine_record_execute where consume > 10 and consume < 100 group by tname , displayName

    3) select consume from fine_record_execute where tname = `doc/Advanced/Chart/ GraphSwitching /Multiple graphs to achieve unified switching. frm `

    4) select sum(consume) from fine_record_execute where tname in (`doc/Advanced/Chart/ GraphSwitching /Multiple charts achieve unified switching. frm `, `doc/Advanced/Chart/Combination/column-area combination chart. cpt `) group by tname , displayName


    4. todate () converts timestamps to ordinary date types

    todate () result is: 2018-12-18 10:15:26

    SQL statement example:

    1)  select todate(time) from fine_record_execute

    2) select * from fine_record_execute where todate(time)<'2018-12-18 10:15:26' and todate(time)>'2018-12-17 10:15:26'

    5. like fuzzy query

    Only supports the usage of '%' before and after

    Note 1: Fuzzy query using like is supported, not like usage is not supported.

    Note 2: Currently, only '%' is supported, and the wildcard '_' is not currently supported. JARs after 2019-06-14 need to be updated.

    SQL statement example:

    1)select * from fine_record_execute where tname like '%demo%'

    Ⅳ. 注意事项

    1. Failed to update after adding table in LogDB

    Problem Description:

    After adding a table in the LogDB database, the update fails. Platform error: The update failed, please contact the administrator to check the error message 

    Cause Analysis:

    1) The edited base table update will be nested, but currently swift does not support nesting. Therefore, FineBI currently does not support the operations in "Problem Description" in this section.

    2) LogDB does not support incremental update. Logdb itself is internal data, and external connection is not recommended. If you want to use sampling to view , you can use full update.


    2. Browser field description

    fine_record_execute table of the LogDB database generally records the browser version used by the client to access the report, for example: CHROME/83.0. When the browser field value is as follows:

    {'Browser':'webkit','Version':'537.36','Agent':'mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit /537.36 ( khtml , like gecko) chrome/81.0.4044.138 

    safari/ 537.36','BoxModel ':true ,'terminal':'null'}

    What is recorded is the value of the browser request header user agent (user agent string), which is equivalent to the unique identifier of the browser.


    3. One template number corresponds to multiple template names

    Problem Description:

    fine_record_execute table of the LogDB database , one reportId corresponds to multiple tnames.

    Cause Analysis:

    The dashboard has been renamed multiple times, and the dashboard is access/export/print after each renaming, so a template number in the fine_record_execute table corresponds to multiple template names.

    Attachment List


    Theme: Admin Guide
    Already the First
    Already the Last
    • Helpful
    • Not helpful
    • Only read

    售前咨询电话

    400-811-8890转1

    在线技术支持

    在线QQ:800049425

    热线电话:400-811-8890转2

    总裁办24H投诉

    热线电话:173-1278-1526

    文 档反 馈

    鼠标选中内容,快速反馈问题

    鼠标选中存在疑惑的内容,即可快速反馈问题,我们将会跟进处理。

    不再提示

    10s后关闭