文档菜单
文档首页
/ /
MongoDB CLI
/ / /

mongocli ops-manager alerts describe

本页内容

  • 语法
  • 参数
  • 选项
  • 继承选项
  • 输出
  • 示例

返回指定项目中警报的详细信息。

要使用此命令,您必须使用具有项目只读角色的用户帐户或API密钥进行身份验证。

命令语法
mongocli ops-manager alerts describe <alertId> [options]
名称
类型
必需
描述
alertId
字符串
您想描述的警报的唯一标识符。
名称
类型
必需
描述
-h, --help
false
describe 命令的帮助信息
-o, --output
字符串
false
输出格式。有效值有 json、json-path、go-template 或 go-template-file。要查看完整的输出,请使用 -o json 选项。
--projectId
字符串
false
用于标识项目的十六进制字符串。此选项会覆盖配置文件或环境变量的设置。
名称
类型
必需
描述
-P, --profile
字符串
false
从您的配置文件中使用的配置文件名。有关MongoCLI配置文件中配置文件的信息,请参阅https://dochub.mongodb.org/core/atlas-cli-configuration-file.

如果命令成功,CLI将返回类似于以下示例的输出。括号中的值代表您的值。

ID TYPE METRIC STATUS
<ID> <EventTypeName> <MetricName> <Status>
# Return the JSON-formatted details for the alert with the ID 5d1113b25a115342acc2d1aa in the project with the ID 5e2211c17a3e5a48f5497de3:
mongocli [ops-manager|cloud-manager] alerts describe 5d1113b25a115342acc2d1aa --projectId 5e2211c17a3e5a48f5497de3 --output json

返回

确认