2021-04-01
splunkbase-info

Read More

2021-04-01
splunk-apps-design

add-on design and name convention

Read More

2021-03-26
splunk-tips

列出一些,目前使用 splunk 有用到的方式

一些有找到,還滿好用的有關 splunk 的 project

  • splunk/splunk-app-examples - App examples for Splunk Enterprise
    • 可以參考這之中的 docker-compose.yml 用法
  • hire-vladimir/SA-cim_vladiator - Data validator agains Splunk Common Information Model (CIM)
    • 用來 validate CIM 滿好用的
  • Kintyre/ksconf - Kintyre’s Splunk Configuration tool
    • 網路上找到,可用來管理 splunk conf 的工具,僅看過說明,還沒有嘗試過

有用到的 vim plugin

Reference

Read More

2021-01-26
splunk-cim

  • 列出目前系統中有的 CIM

    • 於 web 中 search | datamodelsimple type=models
  • 確定要符合那種 data model

  • 接著設定 data model

    • 由 Settings -> Data models -> 選對應的 data model
    • 進行 tag 的設定
      • 由 Settings -> Event Types 進行新增
      • 透過設定檔, app/default/tags.conf
  • 建立需要的 lookup table

    • 可以由 | inputlookup lookup_defintion 可以看到 lookup 的定義
    • 定義 lookup table
    • 設定 lookup 欄位定義
  • 設定 lookup 欄位的步驟

    • 建立 & copy csv 檔案
      • 檔案放置於, app/lookup 目錄中
    • 定義 lookup define 資料
      • 編輯檔案,app/default/transforms.conf
    • 使用 lookup 來 alias 欄位
      • 編輯檔案,app/default/props.conf
  • regex

  • 進行 CIM validate 的工具

一些筆記

  • Two Knowledge Objects included in the CIM

    • Tags
    • Fields
  • Process for Tags

    • Identity
      • identity the data model and dataset revelant to your event
    • Observe
      • Which Tags are required for the dataset ?
      • Are there any constraints ?
    • Apply
      • create event types and tag them with the appropriate tags
    • Verify
      • verify the tags work as expected using Pivot tool
  • Process of Fields

    • Compare the fileds in the data model with the fields in your data
    • Map your fields name to the CIM filed names
      • Aliases
      • Extractions
      • Lookups
  • Two Way to validate your data

    • using the Pivot editor
    • searching the data model itself
  • Six steps in the data normalization pipeline

    • get data in
    • examine data
    • tag events
    • verify tags
    • normalize field
    • validate against data model

Reference

Read More

2021-01-14
splunk-packaging

列出使用 Splunk Packaging Toolkit 的記錄

cmd document

cmd list

  • cmd: slim, slim <command> --help
  • slim generate-manifest
  • slim package
    • slim package [-h] [--debug] [--quiet] [-o <output-dir>] [-r <repository>] [-u <level>] <app-source>
  • slim validate

Reference

Read More

2021-01-14
useful_splunk_cmd

列出,常用的 splunk cmd 作為參考用

command

Read More

2021-01-06
splunk-email-notification

記錄使用 email 來收 splunk alert 時,遇到的情形

修改 mail notificition 的相關設定

Trouble Shooting

Read More

2021-01-06
splunk-trouble-shooting

最近在測試使用 splunk app,要 trouble shooting 需要花些功夫

splunk log path

  • $SPLUNK_HOME/var/log/splunk folder 中,有需要的 log folder
    • for example /opt/splunk/var/log/splunk, linux 中的 path

可以 trouble shooting 的方式

  • 使用 query 的方式
    1
    index=_internal " error " NOT debug source=*splunkd.log* earliest=-24h latest=now
Read More

2020-12-17
develop-Splunk-Apps

記錄一下,要開發 splunk app 時,需要閱讀的資料 & 閱讀的記錄

Visualize data in a Splunk app for Splunk Cloud or Splunk Enterprise

開發工具

一些可以先事前看看的文件

Splunk conf material

publish

Debug

大神的 blog

教學 site

Reference

Read More

2020-12-17
Splunk-AppInspect

List Splunk AppInspect 的相關資料,當寫好一個 splunk app 時,可以使用 AppInspect 檢查 app 的寫法是否符合 splunk 的 specs

sample command

$ splunk-appinspect inspect --included-tags splunk_appinspect $SPLUNK_HOME/etc/apps/[SPLUNK_APP_NAME]

Reference

Read More