All docs This doc

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titleBefore you begin...

Configure API Manager Analytics using the Standard Setup. For instructions, see Configuring APIM Analytics.

  1. Create the AM_USAGE_UPLOADED_FILES table in the WSO2AM_STATS_DB database. A sample MySQL script to create the table is given below.

    Code Block
    CREATE TABLE IF NOT EXISTS AM_USAGE_UPLOADED_FILES (
    TENANT_DOMAIN varchar(255) NOT NULL,
    FILE_NAME varchar(255) NOT NULL,
    FILE_TIMESTAMP TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    FILE_PROCESSED tinyint(1) DEFAULT 0,
    FILE_CONTENT MEDIUMBLOB DEFAULT NULL,
    PRIMARY KEY (FILE_NAME, FILE_TIMESTAMP)
    );
    Warning

    Make sure that you correctly configured the WSO2AM_STATS_DB between WSO2 API Manager and WSO2 API-M Analytics.



Info
titleJava system properties

The following system properties can be passed to the server if the default values need to be changed.

PropertyDefault valueDescription
-Dusage.publishing.frequency=20000300000 (5 minutes)The frequency in which the database is read by the event source. This parameter is defined in milliseconds.
-Dusage.cleanup.frequency=360001800000 (30 minutes)

The frequency in which the cleanup task is run, to remove the processed files. This parameter is defined in milliseconds.


-Dfile.retention.days=5 N/A

The allowed duration for files to remain in the database. This parameter is defined in days

-Dusage.publishing.thread.count=3 3The number of worker threads used to read data from the database. Each thread will read from a single file.
Code Block
titleExample
-Dusage.cleanup.frequency=48000  -Dusage.publishing.frequency=20000 -Dfile.retention.days=3

...

Code Block
enable=false
uploadingTimeSpanInMillis=600000
uploadingEndpoint="https://localhost:9444/micro-gateway-analytics/v0.10/usage/upload-file"
rotatingPeriod=60000
task.uploadFiles=true
username="admin"
password="admin"

...