Auth0 Appliance: Access Your Data
By connecting to your Appliance via SSH, you can access your data in one of two ways.
Run Quick Queries from the Command Line
From the command line, you can run the
query-metrics script, which provides you with one or more of the following metrics:
- The number of MongoDB queries made every second
- The number of attempted logins per second
- The CPU usage per process
- The memory used per process
Get Detailed Usage Information
By running the
query-metrics script without arguments, you can view detailed usage information:
Get Specific Usage Information
To see specific information about a given usage scenario, you can add the appropriate arguments when running the
query-metrics script. To do this, modify your command as follows:
query-metrics <query_idx> <start_time> <end_time> [<additional_args>...]
The following table lists the query index and the metric to which it corresponds:
|Index||Metric||Resolution of Metric||Retention Time|
|0||Number of MongoDB Queries Per Second||5 seconds||1 day|
|1||Number of MongoDB Queries Per Second||1 minute||7 days|
|2||Number of Attempted Logins Per Second||5 seconds||1 day|
|3||Number of Attempted Logins Per Second||1 minute||7 days|
|4||CPU Usage By Process||5 seconds||7 days|
|5||Memory Usage By Process||5 seconds||7 days|
Example 1: View the Number of MongoDB Queries for the Past 2 Minutes
query-metrics 1 "time > now() - 2m" "time < now()"
Example 2: View the CPU Usage by NGINX Processes for the Past 10 Minutes
query-metrics 4 "time > now() - 10m" "time < now()" nginx
Access Data Directly from InfluxDB via Command-Line Interface
You can delete data and drop measurements and databases using the InfluxDB Command-Line Interface. Proceed with caution.
You can access you data directly by querying your InfluxDB instance using its Command-Line Interface (CLI). To do this, run the
influx command from the Appliance. The CLI allows you to run custom queries and explore your data. To see a full list of acceptable arguments for this command, please refer to the InfluxDB documentation.
Within InfluxDB, the database containing Appliance-related data is named
auth0. There are two data retention policies under
1day: contains metrics that get downsampled and stored for 1 day
1week: contains metrics that get downsampled and stored for 1 week
The retention policy and measurement names should be surrounded by double quotes in queries.
The following query allows you to view the number of MongoDB queries per second for the last two minutes.
USE auth 0 SELECT queries_per_sec FROM auth0."1day"."mongodb" WHERE time > now() - 2m
For additional information on querying InfluxDB, please refer to the InfluxDB documentation on data exploration.