cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2065
Views
3
Helpful
3
Replies

CMX - Direct access to database

Hi,

I am running a proof of concept on CMX 10.2.1 and using APIs to retrieve data. I wanted to check if there is another way to connect to database to retrieve the data.

Thanks - Leo

3 REPLIES 3
matfarre
Frequent Contributor

Hi Leo,

CMX uses three databases within it.

      a. Redis - For Current data

      b. Cassandra - For Historical Information

      c. PostGres - For Configuration data

Connect user session data is stored in Redis 6382, and the supported method is to export list of users via the Advanced Search option to a CSV file.

We can export raw data of the location via a Cassandra to CSV output.

try:

[cmxadmin@cmx bin]$ cassandraexport

Usage Syntax: cassandraexport --key <value>

Supported key/value pairs.

    --date <yyyy/mm/dd>

    --table <table name>

    --file <filename>

    --sql <sql statement>

    --rowsperfetch <rows per fetch>

example:

./cassandraexport --sql "select * from hist_mob" --file pwalawal.csv

A feature of 10.3 will be to output analytics data to CSV tables.

CLI command to backup and restore db on CMX 10.2 exist:

cmxctl config backup

cmxctl config backup -i floormaps

cmxctl config restore

The BEST method to get large amounts of data from CMX is to subscribe to notifications that occur whenever a new location calculation occurs, then build your own history database through Northbound Notifications.

Matt

Matt,

thank you, I will try it out.

Best regards - Leo.

Is there a way to view the Cassandra table layout for CMX?

Content for Community-Ad

This widget could not be displayed.