0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

SplunkのSlack通知内のresults_link変更

Posted at

Splunkが発行するアラートには、発火の要因となったサーチ結果へのリンクを含めることができる。
このURLのホスト名はデフォルトではSearchheadのサーバー名となるが、SplunkのSearchheadがバランサ配下にある等、サーバー名とURLが異なる場合は、リンク先を変更したくなる。

Email通知などの組み込み通知機構に関しては、alert_action.confhostnameで変更できる:

が、Slack通知は追加Appなので<splunk_home>/etc/system/local/...での設定を認識しない。

Slack通知のhostnameを変更するにはAppの設定ファイル<splunk_home>/etc/apps/slack_alerts/local/alert_actions.confを変更する。

Ansible的に書くとこのようになる:

- become_user: splunk
  ini_file:
    path: /opt/splunk/etc/apps/slack_alerts/local/alert_actions.conf
    section: null
    option: hostname
    value: https://example.com:443
  notify: Restart splunk
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?