NewRelic:如何仅获取每个 FullHostName 的最后数据(无论何时查询)
在新的遗物基础架构监视(不警报)中,我正在尝试获得最新的CPU和内存,Per fullhostname:
SELECT fullHostname,processorCount,memoryTotalBytes/1073741824 from SystemSample where fullHostname LIKE 'serverconvention%' COMPARE WITH 1 week ago
当上述运行时,我只能在数百台中获得10台服务器。 当我运行以下选择时,我将获得20个以上的条目 per Server :
SELECT fullHostname,processorCount,memoryTotalBytes/1073741824 from SystemSample where fullHostname LIKE 'serverconvention' COMPARE WITH 1 week ago LIMIT Max
那么,我如何将数据仅限为 pullhostName ,只有最新数据(无论 什么时候最新数据出现)?
In New Relic Infrastructure monitoring (not alerting) I am trying to get the latest CPU and Memory, per FullHostName:
SELECT fullHostname,processorCount,memoryTotalBytes/1073741824 from SystemSample where fullHostname LIKE 'serverconvention%' COMPARE WITH 1 week ago
When the above runs I get only 10 servers out of hundreds.
When I run the below choice I get more than 20 entries per server:
SELECT fullHostname,processorCount,memoryTotalBytes/1073741824 from SystemSample where fullHostname LIKE 'serverconvention' COMPARE WITH 1 week ago LIMIT Max
So how do I limit the data to only ONE set of values PER FullHostName, only the LATEST data (regardless of when the latest data came in)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您想要这样的东西:
选择最新(ProcessOrCount),最新(MemoryTotalBytes)/1073741824来自SystemsPample,其中FullHostName之类的“ ServerConvention%” facet facet factet fullhostname与1周前相比,lim lim lim lim lim lim code>这将为您提供最大限制>
这将为您提供。最新的ProcessOrcount/Memory + FaceTing本质上是分组的 - 因此,这应该为您针对的每个唯一主机分解。
I think you want something like this:
SELECT latest(processorCount), latest(memoryTotalBytes)/1073741824 FROM SystemSample where fullHostname LIKE 'serverconvention%' facet fullHostname COMPARE WITH 1 week ago LIMIT MAX
This will give you the latest processorCount/memory + faceting is essentially grouping - so that should break it down for each unique host you are targeting.