RhodeCode Appenlight CLI Guide

appenlight-cleanup

appenlight_cleanup [-c, --config <PATH>] [-t, --types <choices>]
[-r, --resource <resource-id>] [-n, --namespace <resource-id>]

Clean up the RhodeCode Appenlight database records.

Parameters:
  • --config (-c) – Location of the appenlight.ini file.
  • --types (-t) –

    (Optional) Specify the records you want to cleanup in the database from the following options. The default value is logs.

    • reports
    • logs
    • metrics
    • uptime
    • slow_calls
  • --resource (-r) – Specify which application’s records you with to clean up. The <resource-id> refers to your application ID number, which you can get from the RhodeCode Appenlight interface.
  • --namespace (-n) – (Optional) Specify which namespace records you wish to clean up. You can check the available namespace records in your logs.
# Clean up metrics on resource ID 18
$ ~/python/bin/appenlight_cleanup -c ~/appenlight/production.ini \
    -t metrics -r 18

# Reindex Logs
$ ~/python/bin/appenlight_reindex_elasticsearch -c \
    ~/appenlight/production.ini logs

appenlight-initializedb

appenlight-initializedb <ini-file-name>

Create a new RhodeCode Appenlight database and .ini file.

# Create a new dev.ini file and database
$ ~/python/bin/appenlight-initializedb dev.ini

appenlight-migratedb

appenlight_migratedb <ini-file-name>

Migrate the database associated with the specified .ini file.

# Migrate the specified DB
$ ~/python/bin/appenlight-initializedb ~/appenlight/production.ini

appenlight-uptime-monitor

appenlight-uptime-monitor [-c, --config <PATH>] [-s, --sync-url <URL>]
[-u, --update-url <URL>] [-l, --location <ping-id>] [-k, --api-key <api-key>]

RhodeCode Appenlight Uptime Monitor.

Parameters:
  • --config (-c) – Location of the appenlight.ini file.
  • --sync-url (-s) – Specify the source URL for monitoring. The default url is http://127.0.0.1:6543/api/uptime_app_list.
  • --update-url (-u) – Specify the destination URL for the uptime data. The default value is http://127.0.0.1:6543/api/uptime.
  • --location (-l) – Integer identifier for location of ping service. The default location is 1.
  • --api-key (-k) – The root user API key.
# Reindex Logs and metrics
$ ~/python/bin/appenlight-uptime-monitor