Usage Analytics
Overview
As part of the AlphaSense product installation, we provide a usage analytics data stored in MySQL table
Accessing data
Data stored in MySQL database:
DB name : pc_usage_data
Table name : pc_user_usage_metrics
Table schema
{'name': 'login_name', 'type': String(255), 'nullable': False},
{'name': 'event_date', 'type': Date, 'nullable': False},
{'name': 'user_logins', 'type': String(10), 'nullable': True, 'default': 'No'},
{'name': 'page_read_internal_content_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'page_read_external_content_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'dashboard_created_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'search_queries_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'gensearches_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'internal_content_gensearches_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'annotation_created_count', 'type': Integer, 'nullable': True, 'default': 0},
{'name': 'inserted_timestamp', 'type': TIMESTAMP, 'nullable': False}
To fetch the data from the table use
SELECT * from pc_user_usage_metrics;
Access mysql pc_usage_data database
To get the credentials to access the mysql database, you can get the secret default-creds
in mysql
namespace or mandate-reporting-daily-job-shared-0-db
in applications
namespace
namespace.
Access mysql via kubectl
export DB_ENDPOINT=$(kubectl get secret -n applications mandate-reporting-daily-job-shared-0-db -o json | jq -r '.data.endpoint | @base64d')
export DB_USERNAME=$(kubectl get secret -n applications mandate-reporting-daily-job-shared-0-db -ojson | jq -r '.data.username | @base64d')
export DB_PASSWORD=$(kubectl get secret -n applications mandate-reporting-daily-job-shared-0-db -o json | jq -r '.data.password | @base64d')
kubectl run -it --rm --image=docker.io/library/mysql:8 --restart=Never mysql-client -- mysql -h "$DB_ENDPOINT" -u "$DB_USERNAME" -p"$DB_PASSWORD" pc_usage_data