TIBCO Spotfire® Server and Environment - Installation and Administration

Configuring logging to a PostgreSQL database using the command line

You can configure action logging to write to a PostgreSQL database by running additional scripts needed for logging to a database. Sample scripts are included in the installation kit for Spotfire Server.

About this task

This topic describes the steps required to run the configuration scripts from the command line. Alternatively, you can enable and configure the action logging and system monitoring using the configuration tool.

Before you begin

Procedure

  1. Log in to Spotfire Server, and in the file system, browse to the directory containing the installation kit files that you downloaded from the TIBCO eDelivery site.
  2. In the installation kit directory, browse to the directory containing the scripts to create a new database and schema.
    For PostgreSQL, this directory is /scripts/postgres_install/actionlog.
  3. Using a text editor, open the script file create_actionlog_db.bat (or, for Linux, create_actionlog_db.sh).
  4. In the script file, edit the section containing the database name spotfire_actionlog, setting the variables to reflect your database environment.

    You must provide the database password in this script. If you do not have the password, consult your database administrator for assistance.

  5. Run the script to create the database.
    Information and error logs are written to a file named actionlog.txt in the directory from where you run the script. If the script takes a very long time, or if it fails, check this text file for more information.
    The database is created on the server.
  6. On Spotfire Server, from the Start menu, open a command-line window as administrator.
  7. Browse to <installation dir>\tomcat\spotfire-bin.
  8. Export the configuration: At the command prompt, type the command config export-config.
    config export-config --force 
    When prompted, supply the tools password. See export-config for more information.
  9. At the command prompt, type the command config config-action-log-database-logger, passing in the arguments specifying the details of the database.
    For example, to specify the PostgreSQL database URL, driver class, user name, and password, provide the following.
    config config-action-log-database-logger --database-url="jdbc:postgres://[mycompany]:5432/[Mydatabase]" 
    --driver-class="org.postgresql.Driver" --username="spotfire_actionlog" 
    When prompted, supply the tools password. See config-action-log-database-logger for more information.
  10. At the command prompt, type the command config import-config.
    config import-config --comment="adding database configuration for action logging."
    When prompted, supply the tools password. See import-config for more information.
  11. Restart Spotfire Server.

Results

The database is configured.