NewRelic:如何仅获取每个 FullHostName 的最后数据(无论何时查询)

发布于 2025-01-20 22:49:49 字数 607 浏览 1 评论 0原文

在新的遗物基础架构监视(不警报)中,我正在尝试获得最新的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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

ぺ禁宫浮华殁 2025-01-27 22:49:49

我认为您想要这样的东西:

选择最新(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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文