Note
Groups and projects are synonymous terms. Your {GROUP-ID} is the same as your project ID. For existing groups, your group/project ID remains the same. The resource and corresponding endpoints use the term groups.
https://cloud.mongodb.com/prometheus/v1.0
Syntax
GET /groups/{GROUP-ID}/discoveryRequest Path Parameters
Parameter | Required/Optional | Description |
|---|---|---|
| Required | Project identifier. |
Request Query Parameters
Name | Type | Necessity | Description | Default |
|---|---|---|---|---|
targetScheme | TargetScheme | Optional | Type of targets to return. Values include:
|
|
Request Body Parameters
This endpoint doesn't use HTTP request body parameters.
Response
Response Document
The response JSON document includes an array of your latest targets from which to scrape and a document containing their labels.
Name | Type | Description |
|---|---|---|
| array of objects | Each |
| document | Document that contains the label and value that differentiates your metrics. |
labels Embedded Document
Label | Description |
|---|---|
| AWS availability zone ID, Google Cloud fully-qualified name for a zone, or Azure zone number. Azure supports availability zones only in a subset of regions. Atlas provides pre-defined availability zone tags for Azure only for regions that support availability zones. To learn more, see Microsoft Azure. For more information about the possible |
| Label that uniquely identifies the cluster. |
| Unique hexadecimal digit string that identifies the project. |
| Label that uniquely identifies the project. |
| Node type. Possible values are For more information, see Node Types. |
| Unique hexadecimal digit string that identifies the organization. |
| Cloud provider on which the node is provisioned. Possible values are |
| |
| Label that uniquely identifies the replica set. |
Example Request
curl --header 'Accept: application/json'# Sets the `Authorization` header on every scrape request with the# configured username and password.--user prom_user_618d48e05277a606ed2496fe:fSIMUngfTmOTVEB4# The URL that Prometheus fetches the targets from.--request GET "https://cloud.mongodb.com/prometheus/v1.0/groups/673f4ae24759b47bdd3a2e90/discovery"Example Response
[ { "labels": { "availability_zone": "use1-az4", "cl_name": "Cluster012", "group_id": "673f4ae24759b47bdd3a2e90", "node_type": "ELECTABLE", "org_id": "673cad5b6b921181d015e1de", "provider": "AWS", "region": "us-east-1" }, "targets": [ "cluster012-shard-00-00.rffkz.mongodb-dev.net:27018" ] }, { "labels": { "availability_zone": "use1-az6", "cl_name": "Cluster012", "group_id": "673f4ae24759b47bdd3a2e90", "node_type": "ELECTABLE", "org_id": "673cad5b6b921181d015e1de", "provider": "AWS", "region": "us-east-1" }, "targets": [ "cluster012-shard-00-01.rffkz.mongodb-dev.net:27018" ] }, { "labels": { "availability_zone": "use1-az1", "cl_name": "Cluster012", "group_id": "673f4ae24759b47bdd3a2e90", "node_type": "ELECTABLE", "org_id": "673cad5b6b921181d015e1de", "provider": "AWS", "region": "us-east-1" }, "targets": [ "cluster012-shard-00-02.rffkz.mongodb-dev.net:27018" ] }]