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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...