【问题标题】:Anomaly detection for CPU usageCPU使用异常检测
【发布时间】:2017-06-12 05:43:24
【问题描述】:

我有来自 elasticsearch 的度量节拍数据,它有许多属性/列,如“cpu 空闲百分比”、“cpu 使用百分比”等。我想预测服务器 cpu 使用率超过 90% 时的异常情况,比如说3分钟。有人可以对此有所了解吗?

【问题讨论】:

    标签: elasticsearch anomaly-detection


    【解决方案1】:

    看看这个:Implementing a Statistical Anomaly Detector in Elasticsearch

    我自己实现了这篇文章,这很好:-)

    【讨论】:

    • 感谢您的快速回复。我已经阅读了这篇文章,但在我的情况下无法实现。您提到您已经实现了这一点。你能帮我解决这个问题吗?
    • 当然。以一种简化的方式,您应该有一些及时的查询。 A 是您的 CPU 使用率的移动平均值。 B 正在为它移动标准。然后,如果您绘制AMovingAvgThreshold=A+2*B,您将获得cpu 使用率的上限,如果A 高于MovingAvgThreshold,您应该检查您的系统是否突然增加了cpu 使用率。该公式源自统计学中的简单Normal Distribution,效果很好。
    • 我已经准备好了剧情。请查看我对绘图 A 和 A+2*B 的查询:.es(index=metricbeat-,metric='count:system.cpu.system.pct').movi​​ngaverage(10).label (A), .es(index=metricbeat-,metric='count:system.cpu.system.pct').movi​​ngaverage(10).add(.es(metric='count:system.cpu. system.pct').movi​​ngstd(10).multiply(2)).label('MovingAvgThreshold= A+2*B')
    • 现在,如何确定 CPU 使用率的上限?另外,您是如何设置异常警报的?
    • 我没有设置提醒。那只是为了监控。您可以在 timelion 中使用static 函数设置static 上限。
    猜你喜欢
    • 1970-01-01
    • 2014-09-29
    • 2015-01-09
    • 1970-01-01
    • 2021-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多