.. _rae-cli: |RAE| CLI Guide =============== appenlight-cleanup ------------------ .. py:function:: appenlight_cleanup [-c, --config ] [-t, --types ] [-r, --resource ] [-n, --namespace ] Clean up the |RAE| database records. :argument -c --config: Location of the :file:`appenlight.ini` file. :argument -t --types: (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`` :argument -r --resource: Specify which application's records you with to clean up. The ** refers to your application ID number, which you can get from the |RAE| interface. :argument -n --namespace: (Optional) Specify which namespace records you wish to clean up. You can check the available namespace records in your logs. .. code-block:: bash # 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 ----------------------- .. py:function:: appenlight-initializedb Create a new |RAE| database and :file:`.ini` file. .. code-block:: bash # Create a new dev.ini file and database $ ~/python/bin/appenlight-initializedb dev.ini appenlight-migratedb -------------------- .. py:function:: appenlight_migratedb Migrate the database associated with the specified :file:`.ini` file. .. code-block:: bash # Migrate the specified DB $ ~/python/bin/appenlight-initializedb ~/appenlight/production.ini appenlight-reindex-elastic-search --------------------------------- .. py:function:: appenlight_reindex-elastic-search [-c, --config ] [-t, --types ] :argument -c --config: Location of the :file:`appenlight.ini` file. :argument -t --types: (Optional) Specify the records you want to reindex in the database from the following options. The default value is to reindex all records. - ``reports`` - ``logs`` - ``metrics`` - ``uptime`` - ``slow_calls`` .. code-block:: bash # Reindex Logs and metrics $ ~/python/bin/appenlight_reindex_elasticsearch -c \ ~/appenlight/production.ini logs metrics appenlight-uptime-monitor ------------------------- .. py:function:: appenlight-uptime-monitor [-c, --config ] [-s, --sync-url ] [-u, --update-url ] [-l, --location ] [-k, --api-key ] |RAE| Uptime Monitor. :argument -c --config: Location of the :file:`appenlight.ini` file. :argument -s --sync-url: Specify the source URL for monitoring. The default url is ``http://127.0.0.1:6543/api/uptime_app_list``. :argument -u --update-url: Specify the destination URL for the uptime data. The default value is ``http://127.0.0.1:6543/api/uptime``. :argument -l --location: Integer identifier for location of ping service. The default location is ``1``. :argument -k --api-key: The root user API key. .. code-block:: bash # Reindex Logs and metrics $ ~/python/bin/appenlight-uptime-monitor