mongodb-js-compass-kpi-usage
report detailing metrics about how compass is being used
Last updated 4 years ago by brahmgardner .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install mongodb-js-compass-kpi-usage 
SYNC missed versions from official npm registry.

compass-usage-report travis npm

report detailing metrics about how compass is being used

This module implements a CLI for obtaining a text report on various metrics about compass usage. The metrics included are:

  • active user count by OS
  • data on how successfully users connect to instances
  • data on how successfully users autoupdate
  • how often the app is launched per day
  • data on how quickly compass is sampling data
  • data on user session lengths

The module has two capabilities:

  • produce a command line report
  • write the report data to a mongodb collection

In order to run this module on your own machine, you must configure a .env file with the following environment variables:

INTERCOM_APP_ID=<Compass app ID on Intercom>
INTERCOM_API_KEY=<Compass Intercom API Key>
updateSuccessID=<Funnel ID of funnel for auto update success in Mixpanel>
updateCancelID=<Funnel ID of funnel for auto update canceled in Mixpanel>
instanceID=<Funnel ID of funnel for app instance connection in Mixpanel>
MIXPANEL_API_SECRET=<Compass Mixpanel API_Secret>

Example

To produce a command line report:

compass-usage-report cli

To write to a mongodb collection:

compass-usage-report mongo [url] [db] [coll]

The optional arguments for the mongo subcommand are as follows:

  • url: a connection url (default: mongodb://localhost:27017)
  • db: a database to write into (default: test)
  • coll: the collection within the database to write into (default: compass)

The command

compass-usage-report mongo mongodb://data.mongodb.parts:27017

would write to the compass collection in the test database of the above connection url.

Note: The optional arguments are consumed in the order in which they appear. Thus, the first argument is always a connection url, the second is always the database, and the third is always the collection. If only one argument is provided, it is assumed to be a connection url, if two are provided, they are assumed to be a connection url and a database, etc.

Another Note: The connection url is assumed to not have the database name on the end. Though the connection url mongodb://localhost:27017/compass is a valid connection url and would write to the compass database on localhost, the code works by concatenating [db] to [url]. So if you would like to write to the above connection url, run on the command line:

compass-usage-report mongo mongodb://localhost:27017 compass

License

Apache 2.0

Current Tags

  • 0.4.0                                ...           latest (4 years ago)

3 Versions

  • 0.4.0                                ...           4 years ago
  • 0.3.0                                ...           4 years ago
  • 0.2.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (10)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |