mongocli atlas integrations create
The integrations create
command integrates Atlas with the
specified third-party monitoring service. You can use the integrated
third-party service to view and analyze performance metrics that
Atlas collects about your cluster. You can also
integrate third-party services with Atlas using the UI or the API.
You must have Organization Owner or Project Owner role to configure integrations with third-party services.
Syntax
mongocli atlas integrations create DATADOG|datadog --apiKey <api-key> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] --region <api-region>
mongocli atlas integrations create FLOWDOCK|flowdock --apiToken <api-token> --flowName <flow-name> --orgName <organization-name> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ]
mongocli atlas integrations create NEW_RELIC|newRelic|new_relic --accountId <account-ID> --licenseKey <license-key> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] --readToken <query-key> --writeToken <insert-key>
mongocli atlas integrations create OPS_GENIE|opsGenie|ops_genie --apiKey <api-key> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] --region <api-region>
mongocli atlas integrations create PAGER_DUTY|pagerDuty|pager_duty [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] --serviceKey <service-key>
mongocli atlas integrations create VICTOR_OPS|victorOps|victor_ops --apiKey <api-key> [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] [ --routingKey <routing-key> ]
mongocli atlas integrations create WEBHOOK|webhook [ --output|-o <output-format> ] [ --profile|-P <profile-name> ] [ --projectId <project-ID> ] [ --secret <webhook-secret> ] --url <webhook-url>
Note
Use -h
or --help
to view the command-line help for
this command.
Options
Option | Type | Description | Required? |
---|---|---|---|
--apiKey | string | API key for Datadog. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private
keys for the project are saved. If omitted, uses the
default profile. To learn more about creating a
profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--region | string | API URL region to use. Value can be one of the following:
The default value is | yes |
Option | Type | Description | Required? |
---|---|---|---|
--apiToken | string | API token for Flowdock. | yes |
--flowName | string | Name of the Flowdock flow. | no |
--orgName | string | Name of the Flowdock organization. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
Option | Type | Description | Required? |
---|---|---|---|
--accountId | string | Unique identifier of your New Relic account. | yes |
--licenseKey | string | License key
for your New Relic account. | no |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--readToken | string | Insights query key. | yes |
--writeToken | string | Insights insert key. | yes |
Option | Type | Description | Required? |
---|---|---|---|
--apiKey | string | API key for Opsgenie. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--region | string | API URL region to use. Value can be one of the following:
The default value is | yes |
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--serviceKey | string | Service key for PagerDuty. NotePagerDuty decommissioned their v1 API key in October 2018. If you have a v1 key, you can continue to use that key with Atlas. All new PagerDuty keys use their v2 API, but Atlas does not support their v2 key. If you don't have their v1 key, use Webhook instead of PagerDuty. | yes |
Option | Type | Description | Required? |
---|---|---|---|
--apiKey | string | API key for VictorOps. | yes |
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--routingKey | string | Alert routing keys
for VictorOps. | no |
Option | Type | Description | Required? |
---|---|---|---|
--output , -o | string | Command output format. Valid values are:
If omitted, the command returns output in the default format. | no |
--profile , -P | string | Name of the profile where the public and private keys for the project are set. If omitted, uses the default profile. To learn more about creating a profile, see Configure the MongoDB CLI. | no |
--projectId | string | Unique identifier of the project. If omitted, uses the project ID in the profile or environment variable. | no |
--secret | string | Webhook secret. | yes |
--url | string | Webhook URL. | yes |
Output
The command returns the following output to the terminal if the command succeeds. If the command prints an error, see Troubleshooting for recommended solutions.
<third-party-service> integration configured.
For the complete list of JSON fields returned by the command, see the public API reference. The default output contains only a subset of the fields returned by this command.
Example
The following examples use the mongocli atlas integrations create
command to integrate the specified third-party service with
Atlas. It uses the default profile to access Atlas.
mongocli atlas integrations create FLOWDOCK --apiToken 123456 --flowName mySampleFlow --orgName mySampleOrg
The previous command returns the following output to the terminal.
Flowdock integration configured.
mongocli atlas integrations create PAGER_DUTY --serviceKey aBcdEFGhIJkLmOSr7xyz --output json
The previous command returns the following output to the terminal.
{ "links": [ { "rel": "self", "href": "https://cloud.mongodb.com/api/atlas/v1.0/groups/5e2211c17a3e5a48f5497de3/integrations/PAGER_DUTY?pageNum=1\u0026itemsPerPage=100" } ], "results": [ { "type": "PAGER_DUTY", "serviceKey": "aBcdEFGhIJkLmOSr7xyz" } ], "totalCount": 1 }