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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...