ログデータをデータベースに同期する

  • 作成者:ayuan0625
  • 編集回数:7次
  • 最終更新:FRInternational 于 2021-06-23
  • I. Overview

    1. Version

    DesignerJARPlatform log sync to other databases plugin
    10.0
    2020-05-06V1.0.0

    2. Application scenarios

    • Currently LogDB does not support migration. If users want to perform some complex analysis on log, it is troublesome, and hope that the log can be migrated to their own database for management and analysis.

    • The user wants to put the logs of each system in the same place for operation and maintenance management.


    3. Function introduction

    After installing the "Platform log sync to other databases" plugin, users can periodically sync part of the table data in LogDB to other databases through settings.

    II. Plugin introduction

    1. Install the plugin

    Click to download the plugin: com.fr.plugin.log.sync-1.0.7.zip

    Designer plugin installation method reference: Plugin Management

    Server installation plugin method reference: Server plugin management


    2. Databases that support migration

    DatabasesJAR versionSupport database version
    MySQLUnlimited5.1.73、5.5.31、5.5.46、5.5.56、5.6.22、5.6.31、5.7.16
    SQL ServerUnlimited2000、2005、2008、2012、2014、2016
    2019-02-282017
    OracleUnlimited10g、11g、12c、9i

    3. Log sync

    After the plugin is installed successfully, click "Manage>Intelligent Operations>Platform Log", and the "Log Sync" tab is added to the platform log interface, as shown in the following figure:

    1.png

    III. Example

    1. Select the logs to be synchronized

    1) Enter the decision-making platform as an administrator, click "Manage>Intelligent Operations>Platform Log", and click "Set up log sync task" in the "Log Sync" Tab page, as shown in the following figure:

    2.png

    2) In the log sync settings, select "Sync log start time", tick the logs that need to be synchronized, and click "Next". As shown below:

    3.png

    The log tables that support synchronization include:

    • Report execution log fine_record_execute

    • Login log fine_record_login

    • Mail sending log fine_record_email

    • Fill in the log fine_record_write

    • SMS sending log fine_record_sms

    • Management behavior log fine_record_operate

    • Application real-time situation fine_real_time_usage

    • gc log fine_record_gc

    • Function usage fine_intelli_focus_point

    2. Configure database information

    Fill in the relevant information of the database to which the log data will be migrated, and click "OK", as shown in the figure below:

    4.png


    3. Restart the server

    After the plugin configuration is completed, the server needs to be restarted for the configuration to take effect.

    IV. View effect

    1. Sync status

    Note: The sync interval is 3 minutes, and each table can sync at most thirty thousand data at a time.

    After the sync is successful, the sync status is as shown in the figure below:

    5.png

    1) Notify the administrator when sync fails

    If you check the "Notify the administrator when sync fails" button, the administrator will receive a platform message when the sync fails.

    2) Pause sync

    You can click the "Pause" button to pause sync. As shown below:

    6.png

    3) Edit sync settings

    When sync is suspended or failed, you can click the "Edit" button to edit the sync task again. As shown below:

    7.png

    "Start time effective object" setting description:

    If you want all the checked tables to be synced from the "Sync log start time" set by the user, then the "Start time effective object" is set to "All sync logs";

    If you want to sync only the newly added table from the setting value of "Sync log start time", and the remaining synced tables will continue to sync from the place where they were synced before, then the "Start time effective object" is set to "Only valid for the log of this change";

    If you want to suspend the sync of some tables and continue to sync the rest of the tables where they were synced before, set the "Start time effective object" to "Only valid for the log of this change", and then uncheck the need to pause the sync table .

    4) View sync detail

    Click the "View sync detail" button to view the sync details. As shown below:

    Note: At the beginning of the sync period, because the system is searching for data in the database, the "The amount of data synced last time" will be displayed as 0.

    8.png

    Only show the running status of the last sync task. The description of each field is shown in the following table:

    Field nameDescription
    Sync tableSelected sync log
    Sync log deadlineIn the last sync task that has been executed, the latest time of the log in to the database indicates that the logs between the "sync log start time" and this point in time have been stored in the database
    Last sync timeThe start execution time of the sync task at the end of the last execution
    The amount of data synced last timeThe number of log records synced by the sync task at the end of the last execution
    Last sync timeThe time it takes to execute the sync task at the end of the last execution
    Operation result

    Successful/Fail

    If the operation result is "Fail", you can click to view the specific error report


    2. Platform log sync to database

    The log data is synced to the set database. As shown below:

    Note: The content in the field can be stored if it is too long, but the content exceeding 255 characters will be truncated.

    9.png

    The synced table has a new self-increasing primary key (syncID) and a timestamp field (storageTime). An example is shown in the following figure:

    10.png

    When the field name uses the database reserved name, in order to be compatible with each version, alias the reserved name. The specific fields for rename processing are as follows:

    TableOriginal field nameField name after migration
    FINE_RECORD_OPERATEtypeoperateType
    resourceoperateResource
    statusoperateStatus
    FINE_RECORD_EXECUTEtypeexecuteType
    sqlquery
    sqlTimequeryTime
    FINE_RECORD_WRITEsqlquery
    sqlTimequeryTime

    Attachment List


    Theme: FineReport 管理ポータル
    既に最初
    既に最後
    • Helpful
    • Not helpful
    • Only read