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!

Combine Multiline Logs into a Single Event with SOCK - a Guide for Advanced Users

This article is the continuation of the “Combine multiline logs into a single event with SOCK - a step-by-step ...

Everything Community at .conf24!

You may have seen mention of the .conf Community Zone 'round these parts and found yourself wondering what ...

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...