Join us for a virtual Nutanix User Group meeting with Jarian Gibson as he covers Nutanix Cloud Clusters (NC2) on Azure and AWS with Citrix. <\/span><\/p>

Jarian will take a deep dive into NC2 on Azure architecture and Citrix on NC2 on Azure\u00a0that helps you strengthen your business continuity and disaster recovery position. He\u2019ll also provide the latest updates for NC2 on AWS.<\/span><\/p>

Plus, we're\u00a0giving away a Nutanix suitcase to one lucky winner!\u00a0Opt-in when you register\u00a0to be entered to win.\u00a0<\/p>","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":4},"type":"Webinar","url":"https:\/\/next.nutanix.com\/events\/global-nug-nc2-on-azure-and-aws-with-citrix-151","image":"https:\/\/uploads-us-west-2.insided.com\/nutanix-us\/attachment\/f9693b5b-436b-427a-9b98-531b4040ff24_thumb.png","location":"","startsAt":1678298400,"endsAt":1678302000,"contentType":"event","attendees":[],"attendeeCount":0,"isLoggedInUserAttendee":false,"createdAt":"1675974969"},"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"}}}">

解决了

分析选项卡数据导出问题


Userlevel 1
徽章 +8
大家好,



我有一个有关Prism Element UI的分析选项卡的问题。



首先,我很快将解释我们当前的情况:



去年,我们向客户出售了一些Nutanix盒子。在本合同中,我们还包括了监视/管理服务。作为协议,我们每个月都会安排与客户的会议,在那里我们评估Nutanix群集的性能。会议期间我们关注的主要领域有3个主要领域;群集主机使用情况,存储性能和存储使用情况。(请参阅下图)









在本报告中,我们包括从棱镜元素的“分析”选项卡中提取的所有数据。我们将这些数据导入Excel并将数据倒入图表。(请参阅下图)。









这是我们的问题出现的地方。



如您所见,我们需要从数据中同时使用每月和终身图。为了获得此图,我们必须:

- 从Prism元素中删除数据

*您不能选择“开始”和“终结”,因此在导出之后,我们必须手动将数据修剪为我们的需求,并将其从一个Excel导入另一个excel,这需要大量时间来做。

来自导出的.CSV文件的原始数据图片:









*原始数据中的日期格式与Excel不兼容,因此我们将日期转换为另一种格式。

*我们需要以百分位数为单位的数据,我们也需要每天的每日平均值。

*对于延迟,吞吐量和带宽,我们还需要格式化excel中的数据以获取

图。



结论:如您所见,我们需要将大量时间投入到应该很简单的东西中。尤其是当您已经具有实现的分析选项卡时。



那么这里有人遇到了同样的问题吗?

有可能解决方案吗?

也许利用REST API?



提前致谢!



塞巴
图标

最好的答案哈里希2017年3月6日,20:08

sverhoevne<\/a>,
\n
\nHere is the screenshot of the example of extract the cpu and memory usage from Feb 1, 2017 to Feb 28, 2017 with the interval of 30 minutes. The star_time and end_time is the epoch time is microseconds. In this case, the start_time is 1485907200000000 and the end_time is 1488326400000000. You can refer to https:\/\/www.epochconverter.com<\/a> for the conversion and language-specific functions.
\n
\n

<\/a><\/p>","className":"post__content__best_answer"}">

查看原件

该主题已关闭以供评论

20个答复

UserLevel 2
徽章 +11
你好Sverhoevne,,,,



感谢您提出这一点。提取一定数据范围的最佳方法可能是通过REST API。API允许您指定您要拉的统计数据的开始时间和结束时间。
Userlevel 1
徽章 +8
你好哈里希



感谢您的快速答复。



我们知道您可以通过REST API进行此操作。



如何确切地做这是另一回事。



您可以详细说明还是有指南?



提前致谢



塞巴
Userlevel 1
徽章 +8
哈里希



您对此有任何解决方案吗?
UserLevel 2
徽章 +11
你好Sverhoevne,,,,



例如,您可以使用 /cluster /stats获取具有定义的开始和结束时间的统计数据。请参阅下面的屏幕截图。

Userlevel 1
徽章 +8
哈里希



感谢您的回复。



我真的不知道如何开始。您能举个例子,如何从2月1日至28日获得报告?我真的看不到如何使用命令来执行此操作:“以µseconds中的启动时间”,“ seconds中的末日” ...





Sebastiaan
UserLevel 2
徽章 +11
你好Sverhoevne,,,,



这是从2017年2月1日至2017年2月28日提取CPU和内存使用情况的示例的屏幕截图,间隔为30分钟。star_time和end_time是时期时间是微秒。在这种情况下,start_time为1485907200000000,end_time为1488326400000000。您可以参考https://www.epochconverter.com用于转换和语言特定功能。



Userlevel 1
徽章 +8
哈里希



这真的很有帮助,



多谢!





Sebastiaan Verhoeven
Userlevel 1
徽章 +8
哈里希



我尝试了一下,但它返回了一个错误。.我也试图用powershell使用该尸体,但我并没有真正承受什么

STATS_SPECIFIC_RESPONSES和VALUES应该填写..?









塞巴
Userlevel 4
徽章 +19
Sverhoevne



请尝试以下脚本。



https://github.com/sandeepmp/nutanix/blob/master/cluster-report-ntnx.ps1



问候,

Sandeep MP
Userlevel 1
徽章 +8
Sandeepmp



非常感谢!



我将尽快测试TIS并在此处发布结果。



再次感谢!



塞巴
Userlevel 4
徽章 +19
Sverhoevne



脚本有帮助吗?
Userlevel 1
徽章 +8
Sandeepmp



我将在本周测试。
Userlevel 1
徽章 +8
Sandeepmp



我对脚本有一些问题。

有什么办法可以与您联系吗?



问候



塞巴
Userlevel 4
徽章 +19
Sverhoevne目前我正在度假,并将在5月3日回来。您可以在下面与我联系。
Userlevel 1
徽章 +8
嘿,桑德普,



是否可以将多个指标提取到1 CSV文件中?





塞巴
Userlevel 4
徽章 +19
Sverhoevne



我目前正在修改脚本,并且很快就会更新。
Userlevel 4
徽章 +19
Sverhoevne



在下面尝试



######################################################## Function: Cluster-Report-NTNX## Author: Sandeep MP## Description: Gather Cluster stats and exports to mentioned path## Language: PowerShell##############################################################

函数cluster-report-ntnx {param([parameter(poartion = 0,astoration = $ true)])] [字符串] $ password,[parameter(insundation = $ true)] [dateTime] $ startdate,[parameter(andimation = $ true)] [dateTime] $ enddate,[parameter(andortation = $ true)] [int] [int]$ Interval,[parameter(and ossation = $ true)] [string] $ outfile)开始{#add nutanixcmdletspsspssnapinadd-pssnapin nutanixcmdletspsspsspssnapin

#prerequisites检查$ PSSNAPIN = GET -PSSNAPIN $ PSSNAPINCHECK = $ PSSNAPIN.NAME -CONTAINS“ NUTANIXCMDLETSPSSPSSNAPSNAPIN” $ PSVER = $ psversiontable.psversion.psversion.major-major -ge 3if(错误的)){

如果($ PSSNAPINCHECK -EQ $ false){写入host“未安装的nutanix cmdlet”} if($ psver -eq $ false){write-host'powerShell版本应为3.0或以上或更高版本} break} break} $ pwd = convertto-convertto-convertto----securestring $ password -asplaintext -force $ data = @()$ epoch = get -date -date“ 01/01/1970” [int64] $ start_time =(((new -timespan -start $ epoch -epoch -e epoch -end $ startdate).totalmilliseconds))*1000 [int64] $ end_time =(((new -timespan -start $ epoch -end $ enddate).totalmilliseconds)*1000} process {disconnect -ntnxcluster -server-servers -servers -servers -servers*$ clusterout = clusterout = connect -ntnxcluster -sererver $ server $ server -username $ $用户名-PassWord $ PWD -AcceptInvalidssslCerts -forceDConnection $ hypervisor_cpu_usage_ppm =“” $ age_bytes =“” $ hypervisor_cpu_usage_ppm =(get -ntnxclusterstat -metrics” hypervisor_cpu_usage_ppm" -StartTimeInUsecs $start_time -EndTimeInUsecs $end_time -IntervalInSecs $Interval).values$hypervisor_memory_usage_ppm = (Get-NTNXClusterStat -Metrics "hypervisor_memory_usage_ppm" -StartTimeInUsecs $start_time -EndTimeInUsecs $end_time -IntervalInSecs $Interval).values$hypervisor_avg_io_latency_usecs = (Get-NTNXClusterStat-metrics“ hypervisor_avg_io_latency_usecs” -StartTimeInusecs $ start_time -endtimeInusecs $ end_timeinusecs $ end_time -intervalinsecs $ intertal).values $ hypervisor_io_io_io_bandwidth_kbps =(get -ntnxcluster_ hyper_mentires $ hypervistires $ hypervistires $ hypervisttires $ hypervistires- timeInusecs $ end_time -intervalinsecs $ Interval).values $ hypervisor_num_iops =(Get-NTNXClusterStat -Metrics "hypervisor_num_iops" -StartTimeInUsecs $start_time -EndTimeInUsecs $end_time -IntervalInSecs $Interval).values$storage_usage_bytes = (Get-NTNXClusterStat -Metrics "storage.usage_bytes" -StartTimeInUsecs $start_time -EndTimeInUsecs $end_time -IntervalInSecs $Interval)

对于($ i = 0; $ i -lt $ hypervisor_cpu_usage_ppm.count; $ i ++){$ in = new -object psobject psobjectadd-member -inputObject -inputobject $ in -memberType noteproperty in -membertype noteproperty -name -name date $ startdateadd -meartdateD-minputobject $ startdatdd-minputobject $-Name hypervisor_cpu_usage_ppm $hypervisor_cpu_usage_ppm[$i]Add-member -inputobject $into -membertype Noteproperty -Name hypervisor_memory_usage_ppm $hypervisor_memory_usage_ppm[$i]Add-member -inputobject $into -membertype Noteproperty -Name hypervisor_avg_io_latency_usecs $hypervisor_avg_io_latency_usecs[$i]Add-member-inputobject $into -membertype Noteproperty -Name hypervisor_io_bandwidth_kBps $hypervisor_io_bandwidth_kBps[$i]Add-member -inputobject $into -membertype Noteproperty -Name hypervisor_num_iops $hypervisor_num_iops[$i]Add-member -inputobject $into -membertype Noteproperty -Name storage_usage_bytes $storage_usage_bytes[$ i] $ data += $进入

$ startdate = $ startdate.addseconds($ interval)}

}结束{if($ out){$ data |export-csv $ outfilewrite-host“保存在路径中:$ outfile”} else {write-host“无数据可用于导出”} disconnect-ntnxcluster -servers-servers *}}
Userlevel 1
徽章 +8
多谢!



因此,此脚本将所有指标置于一个CSV中,或者我可以选择将哪个指标合并到同一CSV中?





塞巴
Userlevel 4
徽章 +19
Sverhoevne



这个脚本将全部拉入一个CSV
Userlevel 1
徽章 +8
Sandeepmp



嘿,桑德普,感谢到目前为止的所有帮助。



我实际上要实现的是:



- 当您通过参数时,是否可以传递多个指标,以便它们都导入到同一CSV文件中?

例如:



Cluster-Report-NTNX -Server X.X.X.X -UserName username -Password pasword- -Startdate ‘06/01/2017 01:00’ -Enddate ‘06/30/2017 18:00’ -Interval '1800' -OutFile 'c:Filename.csv' -Metric 'Hypervisor CPU Usage (%)', 'Hypervisor Memory Usage (%)'
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