你好,
有什么方法可以获取VM/主机/群集/等。API的统计数据批量?
我们知道 /统计端点,但是这些端点只允许获得单个实体的统计数据,因此,如果群集中有数百个VM,则意味着对API的数百个单独的请求。我们真的不想仅仅通过投票统计数据来对集群施加很多压力。我们的默认轮询间隔为几分钟,因此使用投影=统计信息对我们真的不起作用(我认为它提供了当前价值),我们需要了解民意调查之间时间间隔的统计信息。
非常感谢您的时间。
此致,
马雷克
This survey is one of the largest studies of IT salary, skills, and certifications. It\u2019s the backbone of Skillsoft\u2019s annual IT Skills and Salary Report, which shares detailed insights on skills and certifications, compensation, skills gaps and challenges, and more for IT professionals at every stage of their career.<\/span><\/p> The survey typically takes 10-15 minutes to complete. You can bookmark your progress and pick up where you left off within one week of starting the survey. It\u2019s also completely anonymous. Skillsoft doesn\u2019t sell the data or share it with others.\u00a0<\/p> Participating in the survey is a great way to share how Nutanix certification and training has impacted your career. <\/span>Plus, anyone who completes the survey can enter to win a $100 gift card! <\/em><\/p> \u00a0<\/p> This article was written by Karlie Beil, Customer Marketing Specialist.\u00a0<\/p><\/div><\/div><\/div><\/div><\/div><\/section> \u00a0<\/p> \u00a9\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f 2022 Nutanix, Inc. \u00a0All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. This post may contain express and implied forward-looking statements, which are not historical facts and are instead based on our current expectations, estimates and beliefs. The accuracy of such statements involves risks and uncertainties and depends upon future events, including those that may be beyond our control, and actual results may differ materially and adversely from those anticipated or implied by such statements. Any forward-looking statements included herein speak only as of the date hereof and, except as required by law, we assume no obligation to update or otherwise revise any of such forward-looking statements to reflect subsequent events or circumstances.<\/p>","id":40862,"featuredImage":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/1b5db37d-c54b-4002-8bee-065c799897b2_thumb.png","label":"Blog","replyCount":0,"views":150,"post":{"id":61075,"author":{"id":113632,"url":"\/members\/karlie-beil-113632","name":"Karlie Beil","avatar":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/icon\/200x200\/1581aab3-bcf6-49f4-b2fb-3d11e8c010dc.png","userTitle":"Community Manager","rank":{"isBold":false,"isItalic":false,"isUnderline":false,"name":"Community Manager","color":"#0873ba"},"userLevel":2},"content":" The 2022 IT Salary & Skills Survey is now open, and you can participate!<\/strong> <\/span><\/p> This survey is one of the largest studies of IT salary, skills, and certifications. It\u2019s the backbone of Skillsoft\u2019s annual IT Skills and Salary Report, which shares detailed insights on skills and certifications, compensation, skills gaps and challenges, and more for IT professionals at every stage of their career.<\/span><\/p> The survey typically takes 10-15 minutes to complete. You can bookmark your progress and pick up where you left off within one week of starting the survey. It\u2019s also completely anonymous. Skillsoft doesn\u2019t sell the data or share it with others.\u00a0<\/p> Participating in the survey is a great way to share how Nutanix certification and training has impacted your career. <\/span>Plus, anyone who completes the survey can enter to win a $100 gift card! <\/em><\/p> \u00a0<\/p> This article was written by Karlie Beil, Customer Marketing Specialist.\u00a0<\/p><\/div><\/div><\/div><\/div><\/div><\/section> \u00a0<\/p> \u00a9\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f\ufe0f 2022 Nutanix, Inc. \u00a0All rights reserved. Nutanix, the Nutanix logo and all Nutanix product, feature and service names mentioned herein are registered trademarks or trademarks of Nutanix, Inc. in the United States and other countries. Other brand names mentioned herein are for identification purposes only and may be the trademarks of their respective holder(s). This post may contain links to external websites that are not part of Nutanix.com. Nutanix does not control these sites and disclaims all responsibility for the content or accuracy of any external site. Our decision to link to an external site should not be considered an endorsement of any content on such a site. This post may contain express and implied forward-looking statements, which are not historical facts and are instead based on our current expectations, estimates and beliefs. The accuracy of such statements involves risks and uncertainties and depends upon future events, including those that may be beyond our control, and actual results may differ materially and adversely from those anticipated or implied by such statements. Any forward-looking statements included herein speak only as of the date hereof and, except as required by law, we assume no obligation to update or otherwise revise any of such forward-looking statements to reflect subsequent events or circumstances.<\/p>","url":"\/education-blog-153\/add-your-voice-to-the-it-skills-and-salary-survey-40862?postid=61075#post61075","creationDate":"2022-05-12T20:00:15+0000","relativeCreationDate":"28 days ago"},"contentType":"article","type":3,"likes":0,"hasCurrentUserLiked":false},"phrases":{"Forum":{"{n} year|{n} years":"{n} year|{n} years","{n} month|{n} months":"{n} month|{n} months","{n} day|{n} days":"{n} day|{n} days","{n} hour|{n} hours":"{n} hour|{n} hours","{n} minute|{n} minutes":"{n} minute|{n} minutes","just":"just now","{plural} ago":"{plural} ago"}}}">
你好, 有什么方法可以获取VM/主机/群集/等。API的统计数据批量? 我们知道 /统计端点,但是这些端点只允许获得单个实体的统计数据,因此,如果群集中有数百个VM,则意味着对API的数百个单独的请求。我们真的不想仅仅通过投票统计数据来对集群施加很多压力。我们的默认轮询间隔为几分钟,因此使用投影=统计信息对我们真的不起作用(我认为它提供了当前价值),我们需要了解民意调查之间时间间隔的统计信息。 非常感谢您的时间。 此致, 马雷克 \u00a0<\/p> is there a way how to get VM\/Host\/Cluster\/etc. statistics from API in bulk?<\/p> \u00a0<\/p> We know about the \/stats endpoints, but those only allow to get stats for single entity, so in case there are hundreds of VMs in cluster that would mean hundreds of separate requests to API. We don't really want to put lot of strain on the cluster just by polling stats. Our default polling interval is several minutes, so using projection=stats doesn't really work for us (as I believe it provides current value) and we'd need to know the stats for the time interval between our polls.<\/p> \u00a0<\/p> Thanks so much for your time.<\/p> \u00a0<\/p> Best regards,<\/p> Marek<\/p>","quoteUsername":"MarekSWI","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
嗨,马雷克, 感谢您发布问题。为了更好地理解您的问题,您的问题有两个部分: 您是否检查了我们的Nutanix.dev门户,该门户网站有示例通过REST API收集统计信息。如果您还没有,这是链接: https://www.nutanix.dev/2019/01/16/getting-performance-stats-with-the-nutanix-api-v2-0/ https://www.nutanix.dev/2019/09/23/getting-vm-performance-metrics-via-api/ 此致 thank you for posting your question. To better understand your question, \u00a0have two parts to your question:<\/p> have you checked our nutanix.dev portal, which has examples for collecting stats via rest api. incase you haven\u2019t already, here\u2019s the link : 嗨mutahir, 谢谢您的快速反应。 https:// {{cluster_ip}}:9440/prismgateway/services/rest/v1/vms/{{vm_uuid}}/stats/?量学 广告2) 我们需要在轮询间隔之间具有统计数据,例如由于发现异常和不良状态(峰值和滴)。Nutanix API已经提供了我们需要的粒度,但只有一个每个实体的请求,这会导致大开销。 此致 Thank you for the fast reaction. https:\/\/{{cluster_ip}}:9440\/PrismGateway\/services\/rest\/v1\/vms\/<\/a>{{vm_uuid}}<\/strong><\/a>\/stats\/?metrics={{vm_metric}}&startTimeInUsecs={{startTimeInUsecs}} Ad 2 )<\/p> We need to have stats between the polling intervals e.g. due to a detection of anomalies and unwanted states (peaks and drops). The Nutanix API already provides the granularity that we need but only with one request per entity which causes big performance overhead.<\/p> \u00a0<\/p> Best regards
可能有一个更好的解决方案,但是在类似情况下我必须要做的是首先构建一系列UUID,然后在循环中对阵列中的每个UUID进行查询统计数据,同时将统计数据记录到另一个数组中。 那有意义吗? There may a better solution out there but what I had to do in a similar situation was to build an array of UUIDs first, then query stats for each of UUIDs in the array in a loop while recording stats into another array.<\/p> Does that make sense?<\/p> \u00a0<\/p>","quoteUsername":"Alona","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
输入您的用户名或电子邮件地址。我们将向您发送带有指令的电子邮件以重置您的密码。Take the survey today!<\/strong><\/a><\/h3>
Take the survey today!<\/strong><\/a><\/h3>
如何获取VM/主机/群集/等。API的统计数据批量?
4个答复
\u00a0<\/p>
我已经检查了一切,但没有成功。是的,我们需要在一个响应中拥有一系列多个实体的统计数据。理想情况下,我们希望在一个响应中获得所有统计数据,而无需一个一个响应。
广告1)
目前,API V1仅提供例如以这种方式的VMS统计信息:
在哪里{{vm_uuid}}只是一个特定的UUID标识符。
但是我们需要获取统计数据对于所有散装的实体有一个请求和一个响应无需指定。至少我们需要能够在一个请求中指定一个实体数组,以获取一个包含大部分统计数据的响应。
\u00a0<\/p>
I have checked everything what is possible with no success. Yes we need to have stats for an array of multiple entities as\u00a0bulk in one response.<\/strong> Ideally we would like to have all stats in one response without need to specify them one by one.
Ad 1)\u00a0
Currently the API V1 provides only e.g. VMs stats in this way:<\/p>
Where {{vm_uuid}}<\/strong><\/a>\u00a0<\/strong>is just one particular UUID identifier.
But we need to get stats for all entities as bulk<\/strong> with one request and one response\u00a0without need to specify them.\u00a0At least we need\u00a0to be able to specify an array of entities in one request to get one response containing the bulk of stats.<\/p>
\u00a0<\/p>","quoteUsername":"MarekSWI","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
只是一个随机的想法,我们可以尝试使用Python或JS中的多线程来调用多个API调用,以便执行时间减少。
Just a random idea, we can try to use multi-threading either in python or JS to invoke multiple API calls so the execution time decreases.\u00a0
\u00a0<\/p>","quoteUsername":"HITESH0801","translations":{"Common":{"like":"Like","unlike":"Unlike"},"Forum":{"Quote":"Quote","Share":"Share"}}}">
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">