Deployment Architecture

Deployer から アプリを配布後、Alert を作成しようとしたところ Alert 作成画面にて Send email アイコンが正常に表示されません。

hnoboru_splunk
Splunk Employee
Splunk Employee

アプリを作成し、alert_actions.conf と一緒に Search Head に配布しました。
その後、Search Head 上にて Alert を以下の手順にて作成しようとしたところ、Send email アイコンが正常に表示されませんでした。

[Alert 作成方法]

 (1) サーチの作成
 (2) Save As にて Alert を選択
 (3) Save As Alert 画面にて Add Actions を選択
 (4) Send email アイコンが正常に表示されない

[アプリ内の alert_actions.conf 設定]

 [email]
 reportCIDFontList = jp
 use_ssl = 0
 footer.text = My Footer
 ...
0 Karma
1 Solution

hnoboru_splunk
Splunk Employee
Splunk Employee

本現象は stanza名がユニークでないために発生しています。複数のアプリが同じ Alert Actionを設定することはできません。
本現象の場合、アプリの alert_actions.conf が有効となっており、その alert_actions.conf にて icon_pathが設定されていないため、
Send email アイコンが正常に表示されておりません。
以下に記載致します方法のいずれかにて対応してください。

[方法 1 : 該当内容を savedsearches.conf に記載する]
該当内容を、以下のように savedsearches.conf に記載してください。

savedsearches.conf

 [mySavedSearch]
 action.email = 1
 action.email.reportCIDFontList = jp
 action.email.use_ssl = 0
 action.email.footer.text = My Footer

[方法 2 : 必要な設定を全てアプリ内の alert_actions.conf に記載する]
必要な設定を全てアプリ内に含まれる alert_actions.conf の email stanza に記載してください。
本設定内容が他のアプリにも反映されることに注意してください。

icon_path には、絶対パスではなくファイル名のみを設定してください。
デフォルトのアイコンを使用する場合は、mod_alert_icon_email.png を以下の場所にコピーしてください。

alert_actions.conf

 reportCIDFontList = jp
 use_ssl = 0
 footer.text = My Footer
 ...
 icon_path = <fileName>
 ...

コピー元 : $SPLUNK_HOME/share/splunk/search_mrsparkle/exposed/img/mod_alert_icon_email.png
コピー先 : $SPLUNK_HOME/etc/apps/appName/appserver/static/

[参照]
https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/CustomAlertConfig

 Stanza naming 
 Follow these guidelines when naming the alert action stanza. 
 The stanza name must be unique. Two apps cannot define the same alert action.
 The stanza name can contain only the following characters.
        - alphanumeric characters
        - underscores
        - hyphens
 The stanza name cannot contain spaces.
savedsearches.conf

https://docs.splunk.com/Documentation/Splunk/7.2.5/Admin/Savedsearchesconf

alert_actions.conf
https://docs.splunk.com/Documentation/Splunk/7.2.5/Admin/Alertactionsconf

View solution in original post

0 Karma

hnoboru_splunk
Splunk Employee
Splunk Employee

本現象は stanza名がユニークでないために発生しています。複数のアプリが同じ Alert Actionを設定することはできません。
本現象の場合、アプリの alert_actions.conf が有効となっており、その alert_actions.conf にて icon_pathが設定されていないため、
Send email アイコンが正常に表示されておりません。
以下に記載致します方法のいずれかにて対応してください。

[方法 1 : 該当内容を savedsearches.conf に記載する]
該当内容を、以下のように savedsearches.conf に記載してください。

savedsearches.conf

 [mySavedSearch]
 action.email = 1
 action.email.reportCIDFontList = jp
 action.email.use_ssl = 0
 action.email.footer.text = My Footer

[方法 2 : 必要な設定を全てアプリ内の alert_actions.conf に記載する]
必要な設定を全てアプリ内に含まれる alert_actions.conf の email stanza に記載してください。
本設定内容が他のアプリにも反映されることに注意してください。

icon_path には、絶対パスではなくファイル名のみを設定してください。
デフォルトのアイコンを使用する場合は、mod_alert_icon_email.png を以下の場所にコピーしてください。

alert_actions.conf

 reportCIDFontList = jp
 use_ssl = 0
 footer.text = My Footer
 ...
 icon_path = <fileName>
 ...

コピー元 : $SPLUNK_HOME/share/splunk/search_mrsparkle/exposed/img/mod_alert_icon_email.png
コピー先 : $SPLUNK_HOME/etc/apps/appName/appserver/static/

[参照]
https://docs.splunk.com/Documentation/Splunk/7.2.5/AdvancedDev/CustomAlertConfig

 Stanza naming 
 Follow these guidelines when naming the alert action stanza. 
 The stanza name must be unique. Two apps cannot define the same alert action.
 The stanza name can contain only the following characters.
        - alphanumeric characters
        - underscores
        - hyphens
 The stanza name cannot contain spaces.
savedsearches.conf

https://docs.splunk.com/Documentation/Splunk/7.2.5/Admin/Savedsearchesconf

alert_actions.conf
https://docs.splunk.com/Documentation/Splunk/7.2.5/Admin/Alertactionsconf

0 Karma
Get Updates on the Splunk Community!

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 ...

Introducing the 2024 Splunk MVPs!

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