Alerting

アラートのメール送信先アドレスについて

haruka_saito
Explorer

アラートの設定で、閾値を超えたデータに対してメールを送信しようと考えています。
データによってメールの送信先を変えることは可能でしょうか?

具体的には、経過日数が3日を超えたデータに対してメールを送りたいです。

**チーム名**  **経過日数**
チームA    1day
チームB    5days
チームC    3days

こちらのデータですと、
チームBのデータをチームBのメールアドレスに送り、
チームCのデータをチームCのメールアドレスに送るイメージです。

アラートを複数作成すればできると思うのですが、アラート1つで可能かお聞きしたいです。
よろしくお願いいたします。

0 Karma

melonman
Motivator

まず、チーム名と対応するemailアドレスを準備し、Splunkから参照できるように設定します。(参考:ルックアップ設定

例)email_address 用のCSV

team,email
チームA,A@example.com
チームB,B@example.com
チームC,C@example.com
チームD,D@example.com

3日以上立っているチームをwhereでフィルターして、
lookupの機能を利用して各チームに対するemailアドレスを結果に付加します。

...結果のサーチ | where data_age>=3 |  lookup email_address team OUTPUT email

例えば、以下のような形にします。

team      data_age   email       
チームB    5days      B@example.com
チームC    3days      C@example.com

上のような結果をアラート対象にして、それぞれをemailフィールドに指定されているアドレスに結果を送信するには、アラートの設定で"アラートモード"を結果あたり一回(参考:Per-Result Alert)に指定して、メールの宛先に $result.email$ という形で、emailフィールドを指定していただければいけるとおもいます。(参考:alert設定時のトークンについて

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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