πŸ‘

Looking for our CLI reference?

See here for documentation on all commands, options, and arguments.

This guide explains basic usage of Monte Carlo's CLI. See here for additional details and examples.

Installing/Update the CLI

πŸ‘

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:

montecarlo --version

:bulb: Make sure you install using montecarlodata and not montecarlo.

Setting up the CLI

πŸ“˜

Starting in v0.80.0 of the CLI (releasing on February 7th, 2024), the "AWS profile name" and "AWS region" options will be removed from the initial configuration process (i.e., montecarlo configure).

The profile and region will now need to be set when interacting with any AWS-related commands via the aws-profile and aws-region flags.

The cli docs and help commands will indicate when these flags are necessary.

To configure your CLI with your API key and other settings, please run:

montecarlo configure

You will then be prompted to add your Monte Carlo API key & secret information.

You can generate a key here by selecting "CREATE KEY" for either a personal or service account key:

You will then name your key and have the option to expire your key at varying intervals:

❗️

Careful!

You are only able to see the Secret once! Save that in a safe place.

Choose the option you are comfortable with, and then click "CREATE". Then, input these details into your terminal.

After configuring you can validate your connection with:

montecarlo validate

Documentation

Documentation for commands, options, and arguments can be found here.

Otherwise, to get high-level help, please run:

montecarlo --help

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:

montecarlo help

As an example, this is how you would list all active integrations:

montecarlo integrations list

FAQs

What is aws-profile?

πŸ“˜

Starting in v0.80.0 of the CLI (releasing on February 7th, 2024), the "AWS profile name" and "AWS region" options will be removed from the initial configuration process (i.e., montecarlo configure).

The profile and region will now need to be set when interacting with any AWS-related commands via the aws-profile and aws-region flags.

The cli docs and help commands will indicate when these flags are necessary.

When you set up the CLI, you have the option to specify a default AWS profile based on your locally saved credentials to use when running commands. This flag is only important if the command you are running needs to make changes to your collector.

For example, the following command would update the collector infrastructure, which requires having local credentials saved that we can use to make those changes:

montecarlo collectors upgrade --update-infra

This command will attempt to use the profile you specified when you initially set up your CLI. If you want to use a different set of credentials or didn't specify a profile, you would run:

montecarlo collectors upgrade --update-infra --aws-profile <name_of_local_profile>