Splunk是一款功能強大,功能強大且完全集成的軟體,用於即時企業日誌管理,可收集,存儲,搜索,診斷和報告任何日誌和機器生成的資料,包括結構化,非結構化和複雜的多行應用程式日誌。

它允許您以可重複的方式快速,可重複地收集,存儲,索引,搜索,關聯,視覺化,分析和報告任何日誌資料或機器生成的資料,以識別和解決操作和安全問題。

此外,splunk還支援各種日誌管理用例,例如日誌整合和保留,安全性,IT操作故障排除,應用程式故障排除以及合規性報告等等。

Splunk特點:

  • 它易於擴展和完全集成。
  • 支援本地和遠端資料來源。
  • 允許索引機器資料。
  • 支援搜索和關聯任何資料。
  • 允許您向下鑽取和向上鑽取資料。
  • 支持監控和警報。
  • 還支持用於視覺化的報告和儀錶板。
  • 提供對關聯式資料庫的靈活訪問,以逗號分隔值(.CSV )檔或其他企業資料存儲(如Hadoop或NoSQL)的欄位分隔資料。
  • 支援各種日誌管理用例等等。

在本文中,我們將展示如何安裝最新版本的Splunk日誌分析器以及如何添加日誌檔(資料來源)並在其中搜索CentOS 7中的事件(也適用於RHEL分發)。

 

1.下載linux版本splunk-7.3.2-c60db69f8e32-linux-2.6-x86_64.rpm

https://www.splunk.com/en_us/download/splunk-enterprise.html

2.安裝rpm包

# rpm -i splunk-7.3.2-c60db69f8e32-linux-2.6-x86_64.rpm
warning: splunk-7.3.2-c60db69f8e32-linux-2.6-x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 653fb112: NOKEY
useradd: cannot create directory /opt/splunk
complete

3.啟動服務

# /opt/splunk/bin/./splunk start

4.按enter閱讀PLUNK SOFTWARE LICENSE AGREEMENT

Do you agree with this license? [y/n]: y

5.建立管理員帳號 密碼必須至少包含總共8個可打印ASCII字符

Create credentials for the administrator account.
Characters do not appear on the screen when you type the password.
Password must contain at least:
* 8 total printable ASCII character(s).
Please enter a new password: 
Please confirm new password:

6.安裝檢查都通過 會啟動splunk服務

All preliminary checks passed.
Starting splunk server daemon (splunkd)...  
Generating a 2048 bit RSA private key
......................+++
.....+++
writing new private key to 'privKeySecure.pem'
-----
Signature ok
subject=/CN=youcl/O=SplunkUser
Getting CA Private Key
writing RSA key
Done
[  OK  ]
Waiting for web server at http://127.0.0.1:8000 to be available............. Done
If you get stuck, we're here to help.  
Look for answers here: http://docs.splunk.com
The Splunk web interface is at http://youcl:8000

7.防火牆開啟8000 port

# firewall-cmd --add-port=8000/tcp --permanent
# firewall-cmd --reload

8.瀏覽器開啟 http://:server_ip:8000

可以接收aws的來源來分析log

 

參考資料

https://cloud.google.com/solutions/exporting-stackdriver-logging-for-splunk?hl=zh-tw

https://aws.amazon.com/tw/quickstart/architecture/splunk-enterprise/

 

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料