This guide explains basic usage of Monte Carlo's CLI. The CLI provides commands that will help you set up integrations programmatically.
The CLI requires Python 3.7 or greater.
To install or update the CLI, please run:
pip install -U montecarlodata
And then verify the installation using:
To configure your CLI with your API key and other settings, please run:
You will then be prompted to add your Monte Carlo API key/secret information. You can generate that by going to the "Settings" tab, and then "API". Click on the "CREATE KEY" button:
You will then name your key and have the option to expire your key at varying intervals:
Choose the option you are comfortable with, and then click "CREATE".
You are only able to see the Secret once! Save that in a safe place.
Input these details into your terminal:
The AWS profile and region are only necessary if you host your own Data Collector. If Monte Carlo hosts your data collector, you can skip these entries.
If you do host your own data collector, you will need to run commands through a network that has access to the account the collector is in. Commands like adding a new integration will route from your local network to the network hosting the data collector; it does not run through Monte Carlo's environment.
Next, you are prompted to give your AWS details. It is technically optional to include the AWS settings when setting up the CLI. It is strongly recommended if you are hosting your own Data Collector, but only necessary if you need to do things like make an update to the collector. Any AWS profiles or regions should be for the account the Data Collector is deployed to.
The AWS profile can follow the pattern of
accountid_permission. For example,
12345678_AdministratorAccess. See here for more details: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html
The region will look like
us-east-1. If you leave this blank, we will default to
And then verify the configuration using:
To get high-level help, please run:
Similarly, you can get help for a specific set of commands:
montecarlo integrations --help
To retrieve documentation (help text) on all commands, subcommands and options:
As an example, this is how you would list all active integrations:
montecarlo integrations list
Updated 2 months ago