Getting Data In

データ削除コマンド実行時の影響範囲

msgtrk
Path Finder

以下のそれぞれのコマンドを実行した場合、影響される設定ファイルにはどのようなものがありますか?

(例えば indexes.conf など)

また、設定ファイル以外にも影響のあるファイル・ディレクトリがあれば教えてください。

  • ・・・ | delete
  • splunk clean -index
  • splunk remove index
1 Solution

melonman
Motivator

消し方によって、

・・・ | delete
単純にサーチ時にイベントがHITしないようにする
Indexの定義も残り、データ自体もディスク上に残るが、サーチで引っかからないようになる
サーチとして実行するため、Splunkが実行されている時に実施

splunk clean eventdata -index
Indexの定義は残るが、データは消える
Splunkが停止している際に実行

splunk remove index
データも消え、Indexの定義も消える
indexes.confの該当Indexエントリが削除される。
Splunk実行中でも実施可能

それぞれIndexが保存されているディレクトリ内の情報が変更されたり、削除されたりします。
デフォルトでは、$SPLUNK_HOME/var/lib/splunk 配下に各Indexに指定されているディレクトリが存在します。

消す前に、inputs.conf(データ入力設定)の内容を確認して、消したIndexにデータがIndexされるような設定が残らないように考慮頂く必要がありますので、この辺り注意が必要です。

詳細は、以下のRemove indexes and data from Splunkや、Answersを参考にしていただければとおもいます。
http://docs.splunk.com/Documentation/Splunk/latest/Indexer/RemovedatafromSplunk
http://splunk-base.splunk.com/answers/62516/delete-the-data-after-indexing

View solution in original post

melonman
Motivator

消し方によって、

・・・ | delete
単純にサーチ時にイベントがHITしないようにする
Indexの定義も残り、データ自体もディスク上に残るが、サーチで引っかからないようになる
サーチとして実行するため、Splunkが実行されている時に実施

splunk clean eventdata -index
Indexの定義は残るが、データは消える
Splunkが停止している際に実行

splunk remove index
データも消え、Indexの定義も消える
indexes.confの該当Indexエントリが削除される。
Splunk実行中でも実施可能

それぞれIndexが保存されているディレクトリ内の情報が変更されたり、削除されたりします。
デフォルトでは、$SPLUNK_HOME/var/lib/splunk 配下に各Indexに指定されているディレクトリが存在します。

消す前に、inputs.conf(データ入力設定)の内容を確認して、消したIndexにデータがIndexされるような設定が残らないように考慮頂く必要がありますので、この辺り注意が必要です。

詳細は、以下のRemove indexes and data from Splunkや、Answersを参考にしていただければとおもいます。
http://docs.splunk.com/Documentation/Splunk/latest/Indexer/RemovedatafromSplunk
http://splunk-base.splunk.com/answers/62516/delete-the-data-after-indexing

msgtrk
Path Finder

remove時のみ設定ファイルindexes.confへの影響があるということですね。
それぞれ$SPLUNK_HOME/var/lib/splunk 配下などへの影響があるとのことで承知しました。

回答ありがとうございました。

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...