Recipe for Database

The Log Service can forward logs for the following database:
  • MySQL server version greater than 5.5.
  • PostgreSQL server version greater than 9.2.

Preparing MySQL

  1. Create database users as required.
  2. Create schema and required tables.
    Note: To create the required database and tables, refer to mlaccesslogschema- mysql.sql provided in the tml-spotfire archive.
  3. Provide permissions to the users for the newly created database and table.
  4. Enable remote access to schema for the new users.
On running the SQL, you will see a database named masherylocallogs and a table named tmlaccesslog.
Note: To see the changes, use command-line interface or database client.

Preparing PostgreSQL

  • The process for Preparing PostgreSQL is same as that of Preparing MySQL, explained above.
  • To create the required database and tables, refer mlaccesslogschema-postgres.sql provided in the tml-spotfire archive.

Configuring TIBCO Cloud™ API Management - Local Edition Log service to send access logs to the database

See the Log Service Configuration Properties table for valid values.

tml_log_properties.json
{
  "tmg-internal-statusCheck":"OFF",
  "tmgc_log_service_logLevel" : "info",
  "logserviceURL" : "localhost",
  "td_agent_output_channelType" : "DATABASE",
  "td_agent_out_dbType" : "<MYSQL or POSTGRESQL>",
  "td_agent_out_dbHost" : "<network reachable database host>",
  "td_agent_out_dbPort" : "<port for database>",
  "td_agent_out_dbSchema" : "<name of the database>",
  "td_agent_out_dbUser" : "<db_user>",
  "td_agent_out_dbPassword" : "<db_password>"
 }