Splunk Search

Timechartの結果に閾値を設定したい

ddddragon
New Member

*nixを使用していると、vmstatの結果を収集できます。

この結果から、例えばloadavgが継続的に2以上の時にアラートを出すということをしてみたいのですが、可能なんでしょうか?

sourcetype="vmstat"
| multikv fields loadAvg1mi
| table _time host loadAvg1mi
| eval th=2
| timechart span=10m avg(loadAvg1mi) as loadavg max(th) as 閾値 by host

とすると、10分間の平均が2以上となるし、閾値も同時にグラフ化できて状況の把握には便利ですが、アラート条件にはできません。

sourcetype="vmstat"
| multikv fields loadAvg1mi
| table _time host loadAvg1mi
| stats avg(loadAvg1mi) as loadavg by host | where loadavg>2

というような検索条件を、10分毎に実行するしかないでしょうか。

0 Karma
1 Solution

HiroshiSatoh
Champion

以下、Splunk監視マニュアルからの抜粋です。

  1. [生成条件] リストで、[カスタム条件を満たす場合] を選択します。[カスタム条件] フィールドが表示されます。
  2. [カスタム条件] フィールドに条件サーチを入力します。
  3. アラートアクション、抑制ルール、および共有 (後述) を定義して、アラート定義を完成します。

[カスタム条件] フィールドでloadavgを条件設定すればアラート時にloadavgと閾値を表示できると思います。これで要求を満たせませんか?

View solution in original post

0 Karma

HiroshiSatoh
Champion

以下、Splunk監視マニュアルからの抜粋です。

  1. [生成条件] リストで、[カスタム条件を満たす場合] を選択します。[カスタム条件] フィールドが表示されます。
  2. [カスタム条件] フィールドに条件サーチを入力します。
  3. アラートアクション、抑制ルール、および共有 (後述) を定義して、アラート定義を完成します。

[カスタム条件] フィールドでloadavgを条件設定すればアラート時にloadavgと閾値を表示できると思います。これで要求を満たせませんか?

0 Karma

melonman
Motivator

Summary : ddddragon wants to fire an alert when vmstat's loadavg exceeds a threshold (eval th=2) two or more times continuously.

0 Karma

asimagu
Builder

can we get english?

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...