解决了

Nutanix解决并确认警报

  • 2021年1月24日
  • 2个答复
  • 210次观看

你好!使用2个API调用后
https://www.nutanix.dev/reference/prism_element/v2/api/alerts/post-alerts-acknowledge-acknowledgealerts/
https://www.nutanix.dev/reference/prism_element/v2/api/alerts/post-alerts-resolve-resolvealerts/
我收到了这个回复

{"num_successful_updates": 1, "num_failed_updates": 0, "alert_status_list": [ { "id": "0:0", "successful": true, "message": null } ] }I wasn’t able to understand what the “id” field in “alert_status_list” means, if someone here could clarify I would really appreciate it.
图标

最好的答案阿罗纳2021年1月27日,02:54

Hi TomNeeman,<\/p>

You can use get\/alerts to capture \u201cid\u201d and the \u201cmessage\u201d.<\/p>

For example:<\/p>

  \"acknowledged_by_username\": \"N\/A\",
\"message\": \"{file_server_alert_msg}\",
\"detailed_message\": \"//www.jhbzcj.com/next/how-it-works-22/\",
\"alert_title\": \"{file_server_smart_alert_title}\",
\"acknowledged_time_stamp_in_usecs\": 1611711650534653,
\"resolved_time_stamp_in_usecs\": 1611711650534645,
\"resolved_by_username\": \"N\/A\",
\"user_defined\": false,
\"affected_entities\": [
{
\"entity_type\": \"file_server\",
\"entity_type_display_name\": null,
\"entity_name\": null,
\"uuid\": \"fc071bd0-1234-417c-4567-fdaeebc68161\",
\"id\": \"fc071bd0-1234-417c-4567-fdaeebc68161\"
<\/code><\/pre>

Let us know how you go.<\/p>","className":"post__content__best_answer"}">

查看原件

该主题已关闭以供评论

2个答复

UserLevel 6
徽章 +5

嘿, @Tomneeman

我认为这里的“ ID”应该是警报ID,或者可能是警报的状态,“ 0”,以成功操作,而不是零。

UserLevel 6
徽章 +5

嗨,汤姆尼曼,

您可以使用get/警报捕获“ ID”和“消息”。

例如:

“ encented_by_username”:“ n/a”,
“消息”:“ {file_server_alert_msg}”,
“详细信息”:“”,
“ alert_title”:“ {file_server_smart_alert_title}”,
“ enperted_time_stamp_in_usecs”:1611711650534653,
“ Resolved_time_stamp_in_usecs”:1611711650534645,
“ resolved_by_username”:“ n/a”,
“ user_defined”:false,
“ affected_entities”:[
{
“ entity_type”:“ file_server”,
“ entity_type_display_name”:null,
“ entity_name”:null,
“ uuid”:“ FC071BD0-1234-417C-4567-FDAEEBC68161”,
“ ID”:“ FC071BD0-1234-417C-4567-FDAEEBC68161”

让我们知道你怎么走。

Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu