对于 AI 代理:可在 https://www.mongodb.com/zh-cn/docs/llms.txt 获取文档索引—通过在任何 URL 路径后添加 .md 可获取所有页面的 Markdown 版本。

Atlas API 分片洞察 获取分片指标测量

返回指定分片集群中一个分片的所请求测量的时间序列。

atlas api 子命令是从 MongoDB Atlas Admin API 自动生成的,并提供对 Admin API 的全面覆盖。Admin API功能有自己的发布生命周期,您可以通过提供的API终结点文档链接进行检查。

The series average the readings of the shard's member processes selected by nodeType. Responds with a 404 only when no shard with the given replicaSetName exists in the cluster; a shard that exists but has no readings yet returns series of null data points. Each series carries one data point per granularity interval, starting at start and not passing end. A data point's value is null when MongoDB Cloud has no reading for that interval; this includes the first minutes after a cluster or shard is created, before its metrics are collected, so null must not be read as zero load. Set period, or set both start and end; when neither is set, the response covers the last hour. A request whose window and granularity would produce more than 1000 data points per series is rejected.

此命令为自动生成,对应 1:1 Atlas API 终结点 https://www.mongodb.com/zh-cn/docs/api/doc/atlas-admin-api-v2/operation/operation-getgroupclustershardmetricmeasurements.

有关更多信息和示例,请参阅上面链接的参考API文档。

命令语法

atlas api shardingInsights getShardMetricMeasurements [options]
名称
类型
必需
说明

--clusterName

字符串

true

用于标识集群的人类可读标签。

--end

字符串

false

MongoDB Cloud 停止报告指标的日期和时间。此参数以 UTC 格式的 ISO 8601 时间戳表示其值。未设置周期时,请包含此参数。

--envelope

envelope

false

指示应用程序是否将响应包装在信封JSON对象中的标志。某些API客户端无法访问权限HTTP响应标头或状态代码。要修复此问题,请在查询中设立Envelope=true。返回结果列表的端点将结果对象用作信封。应用程序将状态参数添加到响应正文中。

--granularity

字符串

false

Interval between consecutive data points, in ISO 8601 duration format. If omitted, MongoDB Cloud chooses the resolution from the width of the window.

--groupId

字符串

true

用于标识项目的唯一 24-十六进制数字字符串。 使用 [/groups](# 标签/Projects/operation/listProjects) 端点检索身份验证的用户有权访问权限的所有项目。

注意:群组和项目是同义词。您的群组 ID 与项目 ID 相同。对于现有群组,群组/项目 ID 保持不变。资源和相应的端点使用“群组”一词。

-h,--help

false

获取分片指标测量的帮助

--m

m

false

One or more measurements to return. If omitted, the resource returns all measurements. To specify multiple values for m, repeat the m parameter for each value.

--nodeType

字符串

false

碎片成员的读数被平均到碎片系列中。

-o, --output

字符串

false

首选API格式,可以是 ["JSON", go-template] 此值默认为 "JSON"。

--outputFile

字符串

false

要将API输出写入其中的文件。 当端点的输出为二进制(例如:gzip)且命令未通过管道传输(例如: Atlas command > out.zip)时,需要使用此标志

--period

字符串

false

Atlas 报告指标的持续时间。此参数以 UTC 格式的 ISO 8601 持续时间格式表示其值。在未设置开始和结束时包含此参数。

--pretty

false

指示响应正文是否应采用 prettyprint 格式的标记。

--副本集名称

字符串

true

用于标识分片的易读标签,即其成员的副本集名称。

--start

字符串

false

MongoDB Cloud 开始报告指标的日期和时间。此参数以 UTC 格式的 ISO 8601 时间戳表示其值。未设置周期时,请包含此参数。

--version

字符串

false

调用 Atlas API 终结点时要使用的 API 版本 [选项:"2025-03-12"]。如果用户未设置,则默认为最新版本,或者如果已设置了配置文件的 api_version 值,则默认为该值。此值默认为 "2025-03-12"。

名称
类型
必需
说明

-P, --profile

字符串

false

要从您的配置文件中使用的配置文件的名称。要学习;了解Atlas CLI配置文件,请参阅 https://dochub.mongodb.org/core/atlas-cli-save-connection-settings.

atlas api shardingInsights getShardMetricMeasurements --version 2025-03-12 --clusterName [clusterName] --granularity PT1M --groupId 32b6e34b3d91647abb20e7b8 --period PT10H --replicaSetName atlas-12vorz-shard-0
给本页内容打分