Skip to content

Commands

ralph

Ralph is a stream-based tool to play with your logs.

Usage:

ralph [OPTIONS] COMMAND [ARGS]...

Options:

  -v, --verbosity LVL  Either CRITICAL, ERROR, WARNING, INFO (default) or
                       DEBUG
  --version            Show the version and exit.
  --help               Show this message and exit.

ralph auth

Generate credentials for LRS HTTP basic authentification.

Usage:

ralph auth [OPTIONS]

Options:

  -u, --username TEXT  The user for which we generate credentials.  [required]
  -p, --password TEXT  The password to encrypt for this user. Will be prompted
                       if missing.  [required]
  -s, --scope TEXT     The user scope(s). This option can be provided multiple
                       times.  [required]
  -w, --write          Write new credentials to the LRS authentication file.
  --help               Show this message and exit.

ralph convert

Convert input events to a given format.

Usage:

ralph convert [OPTIONS]

Options:

  From edX to xAPI converter options: 
    -u, --uuid-namespace TEXT     The UUID namespace to use for the `ID` field
                                  generation
    -p, --platform-url TEXT       The `actor.account.homePage` to use in the
                                  xAPI statements  [required]
  -f, --from [edx]                Input events format to convert  [required]
  -t, --to [xapi]                 Output events format  [required]
  -I, --ignore-errors             Continue writing regardless of raised errors
  -F, --fail-on-unknown           Stop converting at first unknown event
  --help                          Show this message and exit.

ralph extract

Extract input events from a container format using a dedicated parser.

Usage:

ralph extract [OPTIONS]

Options:

  -p, --parser [gelf|es]  Container format parser used to extract events
                          [required]
  --help                  Show this message and exit.

ralph fetch

Fetch an archive or records from a configured backend.

Usage:

ralph fetch [OPTIONS] [ARCHIVE]

Options:

  -b, --backend [es|mongo|clickhouse|ldp|fs|swift|s3|ws]
                                  Backend  [required]
  ws backend: 
    --ws-uri TEXT
  s3 backend: 
    --s3-endpoint-url TEXT
    --s3-bucket-name TEXT
    --s3-default-region TEXT
    --s3-session-token TEXT
    --s3-secret-access-key TEXT
    --s3-access-key-id TEXT
  swift backend: 
    --swift-os-identity-api-version TEXT
    --swift-os-auth-url TEXT
    --swift-os-project-domain-name TEXT
    --swift-os-user-domain-name TEXT
    --swift-os-storage-url TEXT
    --swift-os-region-name TEXT
    --swift-os-password TEXT
    --swift-os-username TEXT
    --swift-os-tenant-name TEXT
    --swift-os-tenant-id TEXT
  fs backend: 
    --fs-path TEXT
  ldp backend: 
    --ldp-stream-id TEXT
    --ldp-service-name TEXT
    --ldp-consumer-key TEXT
    --ldp-application-secret TEXT
    --ldp-application-key TEXT
    --ldp-endpoint TEXT
  clickhouse backend: 
    --clickhouse-client-options KEY=VALUE,KEY=VALUE
    --clickhouse-password TEXT
    --clickhouse-username TEXT
    --clickhouse-event-table-name TEXT
    --clickhouse-database TEXT
    --clickhouse-port INTEGER
    --clickhouse-host TEXT
  mongo backend: 
    --mongo-client-options KEY=VALUE,KEY=VALUE
    --mongo-collection TEXT
    --mongo-database TEXT
    --mongo-connection-uri TEXT
  es backend: 
    --es-op-type TEXT
    --es-client-options KEY=VALUE,KEY=VALUE
    --es-index TEXT
    --es-hosts VALUE1,VALUE2,VALUE3
  -c, --chunk-size INTEGER        Get events by chunks of size #
  -q, --query '{"KEY": "VALUE", "KEY": "VALUE"}'
                                  Query object as a JSON string (database
                                  backends ONLY)
  --help                          Show this message and exit.

ralph list

List available archives from a configured storage backend.

Usage:

ralph list [OPTIONS]

Options:

  -b, --backend [ldp|fs|swift|s3]
                                  Backend  [required]
  s3 backend: 
    --s3-endpoint-url TEXT
    --s3-bucket-name TEXT
    --s3-default-region TEXT
    --s3-session-token TEXT
    --s3-secret-access-key TEXT
    --s3-access-key-id TEXT
  swift backend: 
    --swift-os-identity-api-version TEXT
    --swift-os-auth-url TEXT
    --swift-os-project-domain-name TEXT
    --swift-os-user-domain-name TEXT
    --swift-os-storage-url TEXT
    --swift-os-region-name TEXT
    --swift-os-password TEXT
    --swift-os-username TEXT
    --swift-os-tenant-name TEXT
    --swift-os-tenant-id TEXT
  fs backend: 
    --fs-path TEXT
  ldp backend: 
    --ldp-stream-id TEXT
    --ldp-service-name TEXT
    --ldp-consumer-key TEXT
    --ldp-application-secret TEXT
    --ldp-application-key TEXT
    --ldp-endpoint TEXT
  -n, --new / -a, --all           List not fetched (or all) archives
  -D, --details / -I, --ids       Get archives detailed output (JSON)
  --help                          Show this message and exit.

ralph push

Push an archive to a configured backend.

Usage:

ralph push [OPTIONS] [ARCHIVE]

Options:

  -b, --backend [es|mongo|clickhouse|ldp|fs|swift|s3]
                                  Backend  [required]
  s3 backend: 
    --s3-endpoint-url TEXT
    --s3-bucket-name TEXT
    --s3-default-region TEXT
    --s3-session-token TEXT
    --s3-secret-access-key TEXT
    --s3-access-key-id TEXT
  swift backend: 
    --swift-os-identity-api-version TEXT
    --swift-os-auth-url TEXT
    --swift-os-project-domain-name TEXT
    --swift-os-user-domain-name TEXT
    --swift-os-storage-url TEXT
    --swift-os-region-name TEXT
    --swift-os-password TEXT
    --swift-os-username TEXT
    --swift-os-tenant-name TEXT
    --swift-os-tenant-id TEXT
  fs backend: 
    --fs-path TEXT
  ldp backend: 
    --ldp-stream-id TEXT
    --ldp-service-name TEXT
    --ldp-consumer-key TEXT
    --ldp-application-secret TEXT
    --ldp-application-key TEXT
    --ldp-endpoint TEXT
  clickhouse backend: 
    --clickhouse-client-options KEY=VALUE,KEY=VALUE
    --clickhouse-password TEXT
    --clickhouse-username TEXT
    --clickhouse-event-table-name TEXT
    --clickhouse-database TEXT
    --clickhouse-port INTEGER
    --clickhouse-host TEXT
  mongo backend: 
    --mongo-client-options KEY=VALUE,KEY=VALUE
    --mongo-collection TEXT
    --mongo-database TEXT
    --mongo-connection-uri TEXT
  es backend: 
    --es-op-type TEXT
    --es-client-options KEY=VALUE,KEY=VALUE
    --es-index TEXT
    --es-hosts VALUE1,VALUE2,VALUE3
  -c, --chunk-size INTEGER        Get events by chunks of size #
  -f, --force                     Overwrite existing archives or records
  -I, --ignore-errors             Continue writing regardless of raised errors
  --help                          Show this message and exit.

ralph runserver

Run the API server for the development environment.

Starts uvicorn programmatically for convenience and documentation.

Usage:

ralph runserver [OPTIONS]

Options:

  -b, --backend [es|mongo|clickhouse]
                                  Backend  [required]
  clickhouse backend: 
    --clickhouse-client-options KEY=VALUE,KEY=VALUE
    --clickhouse-password TEXT
    --clickhouse-username TEXT
    --clickhouse-event-table-name TEXT
    --clickhouse-database TEXT
    --clickhouse-port INTEGER
    --clickhouse-host TEXT
  mongo backend: 
    --mongo-client-options KEY=VALUE,KEY=VALUE
    --mongo-collection TEXT
    --mongo-database TEXT
    --mongo-connection-uri TEXT
  es backend: 
    --es-op-type TEXT
    --es-client-options KEY=VALUE,KEY=VALUE
    --es-index TEXT
    --es-hosts VALUE1,VALUE2,VALUE3
  -h, --host TEXT                 LRS server host name
  -p, --port INTEGER              LRS server port
  --help                          Show this message and exit.

ralph validate

Validate input events of given format.

Usage:

ralph validate [OPTIONS]

Options:

  -f, --format [edx|xapi]  Input events format to validate  [required]
  -I, --ignore-errors      Continue validating regardless of raised errors
  -F, --fail-on-unknown    Stop validating at first unknown event
  --help                   Show this message and exit.