Metrics

The metrics module helps understand how users consume documentation on the reading portal: what they read, for how long, and which sections are most useful. This data helps make decisions: how to improve articles, navigation, and content depth.

Configure image for module

  1. Start PostgreSQL (Docker example, but any method works):

    docker run --name gramax-postgres \ -e POSTGRES_USER={your_db_user} \ -e POSTGRES_PASSWORD={your_db_password} \ -e POSTGRES_DB={your_db_name} \ -p 5432:5432 \ -d postgres:18-alpine
  2. Set variables for the enterprise service image:

    Variable

    Description

    Example value

    ENTERPRISE_DB_TYPE

    DBMS type for connection. Currently only postgres is supported. The field is required.

    postgres

    ENTERPRISE_DB_USER

    Database username. Must match POSTGRES_USER used when creating the container.

    postgres

    ENTERPRISE_DB_PASSWORD

    Database user password. Must match POSTGRES_PASSWORD used when creating the container.

    postgres

    ENTERPRISE_DB_HOST

    Host address where the database is running.

    localhost

    ENTERPRISE_DB_PORT

    Port listened to by PostgreSQL.

    5432

    ENTERPRISE_DB_NAME

    Database name. Must match POSTGRES_DB used when creating the container.

    metrics

  3. Verify service startup: on launch, the app connects to the DB, creates tables, and runs migrations.

Enable metrics module in app

  1. Open the Gramax Enterprise Server admin panel: Settings → Modules.

  2. Enable the metrics module.

  3. Open any metrics page and verify it is active.