Splunk Forwarderのセットアップ

Splunkのホストサーバに対してログファイルを送るクライアントサーバの設定をする。
Splunk公式サイトからSplunk Forwarderのrpmファイルをもらってきて

[root@Splunk Splunk]# rpm -ivh splunkforwarder-5.0.1-143156-linux-2.6-x86_64.rpm 
警告: splunkforwarder-5.0.1-143156-linux-2.6-x86_64.rpm: ヘッダ V3 DSA/SHA1 Signature, key ID 653fb112: NOKEY
準備中... ########################################### [100%]
   1:splunkforwarder ########################################### [100%]
----------------------------------------------------------------------
Splunk has been installed in:
        /opt/splunkforwarder

To start Splunk, run the command:
        /opt/splunkforwarder/bin/splunk start



Complete documentation is at http://docs.splunk.com/Documentation/Splunk
----------------------------------------------------------------------

などとするとサクッと入る。
指示通り

[root@Splunk Splunk]# /opt/splunkforwarder/bin/splunk start

などすると、ライセンスに関するテキストがダーッと出てくるので
accept-license などとオプションを付けてやれば普通に起動する。

[root@Splunk Splunk]# /opt/splunkforwarder/bin/splunk start --accept-license
This appears to be your first time running this version of Splunk.

Splunk> See your world. Maybe wish you hadn't.

Checking prerequisites…
 Checking mgmt port [8089]: open
  Creating: /opt/splunkforwarder/var/lib/splunk
  Creating: /opt/splunkforwarder/var/run/splunk
  Creating: /opt/splunkforwarder/var/run/splunk/appserver/i18n
  Creating: /opt/splunkforwarder/var/run/splunk/appserver/modules/static/css
  Creating: /opt/splunkforwarder/var/run/splunk/upload
  Creating: /opt/splunkforwarder/var/spool/splunk
  Creating: /opt/splunkforwarder/var/spool/dirmoncache
  Creating: /opt/splunkforwarder/var/lib/splunk/authDb
  Creating: /opt/splunkforwarder/var/lib/splunk/hashDb
New certs have been generated in '/opt/splunkforwarder/etc/auth'.
 Checking conf files for typos… Done
All preliminary checks passed.

Starting splunk server daemon (splunkd)… Done
                                                           [ OK ]

これで起動OK

以下は自動起動設定や環境変数の設定を行う。

[root@Splunk Splunk]# /opt/splunkforwarder/bin/splunk enable boot-start
Init script installed at /etc/init.d/splunk.
Init script is configured to run at boot.
[root@Splunk Splunk]# export SPLUNK_HOME=/opt/splunkforwarder
[root@Splunk Splunk]# PATH=$PATH:$HOME/bin:$SPLUNK_HOME/bin
[root@Splunk Splunk]# export PATH

最後にデータの送り先である、ホストサーバーを追加して完了。

[root@Splunk Splunk]# splunk add forward-server 192.168.10.16:9997
username: admin
Password:changme 
Added forwarding to: 192.168.10.16:9997.

この時入力するユーザー名とパスワードは、Splunk Forwarderのものである。
デフォルト値のusername: admin Password:changme を入力する。