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
Get Updates on the Splunk Community!

Index This | When is October more than just the tenth month?

October 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Observe and Secure All Apps with Splunk

  Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What’s New & Next in Splunk SOAR

 Security teams today are dealing with more alerts, more tools, and more pressure than ever.  Join us for an ...