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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...