Linux(Ubuntu/CentOS)安裝splunkforwarder步驟

Linux(Ubuntu/CentOS)安裝splunkforwarder步驟:

splunkforwarder是splunk的客戶端log轉發工具:

下載網址(下載tar包):
https://www.splunk.com/en_us/download/universal-forwarder.html

splunk服務器端要開啓接收端口(設置——轉發和接收——配置接收——新增——9997)

客戶端:

安裝:

tar zxfv splunkforwarder-7.3.0-657388c7a488-Linux-x86_64.tgz -C /opt/

啓動splunkforwarder:

/opt/splunkforwarder/bin/splunk enable boot-start

回車,100%後輸入y
帳號名:splunk (啓動時需要有個管理帳號)
密碼:xxxxx

service splunk start

/opt/splunkforwarder/bin/splunk set deploy-poll ip:8089

輸入上面設置的帳號密碼

/opt/splunkforwarder/bin/splunk add forward-server ip:9997 (ip爲splunk服務器端ip)

查看接收服務器:

/opt/splunkforwarder/bin/splunk list forward-server

添加收集項:

/opt/splunkforwarder/bin/splunk add monitor /var/log/mysql/error.log

/opt/splunkforwarder/bin/splunk add monitor /var/log/httpd/error_log

也可以直接修改下面文件:
/opt/splunkforwarder/etc/apps/search/local/inputs.conf

重啓服務:

service splunk restart

到splunk服務器端——設置——轉發器管理——能看到客戶端已連接

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章