How To
Summary
このテックノートでは、ariel_offline_indexer.sh スクリプトに関する情報を提供します。このスクリプトは QRadar 内で使用され、ariel 非構造化データベースに保存されたイベントに関連する情報を、マイグレーションやイベントの再割り当てなどの際に再マッピングします。
Objective
このスクリプト ( ariel_offline_indexer.sh ) を実行すると、/store/ariel データベース内のすでに解析および書き込まれたデータからインデックスが再作成されます。
このスクリプトはいつ必要ですか? このシナリオに一致する理由はいくつか挙げられます。その中から以下を列挙します。
- さまざまな環境からのイベントの移行。 詳しくは、QRadar SIEM Hardware Migration Scenarios または Migrating ariel event and flow data between QRadar appliances を参照してください。
- 異なる IP を使用してホストをデプロイメントに再追加します。
- /store/ariel データベース内のスーパー・インデックスが破損すると、検索結果が 0 になります。 この症状は、特定の時間枠で 「ログ・アクティビティー」タブ内に結果が得られない場合に最も一般的です。
Environment
ariel offline indexer スクリプトは、検索、ダッシュボード、レポートで使用されるインデックスの再インデックスを行い、これらの活動でより速い結果を提供するように設計されています。このスクリプトは /opt/qradar/bin ディレクトリーにあります
-h フラグを使用すると、スクリプトで使用できるオプションのリストを表示できます。
/opt/qradar/bin/ariel_offline_indexer.sh -h
usage: options
-R,--repair re-build corrupted super indices
-d,--duration time duration to look files for in minutes, for
example -d 5
-n,--name ariel data base name, for example -n events
-t,--endtime end time, for example -t "2023/03/20 19:18",
optional, by default current system time
-F,--renamefrom rename from (internal use)
-L,--light load minimal QRadar frameworks
-T,--renameto rename to (internal use)
-V,--validate validate super indices
-a,--auto backfill all active indexes
-b,--batchmode run in batch mode with options in a file
-f,--fts create free text search indices
-h,--help print this message
-k,--key property java class name
-l,--list list all enabled indices from the configuration
-p,--param optional parameter for property (key creator
construction)
-r,--remove remove indices for a property
-s,--superindices create super indices from the minute indices
-v,--verbose verbose (optional, default = false)
-w,--threads maximum number of threads to produce minute indices
if requested, default is 8
ariel_offline_indexer.sh スクリプトは、実行時にローカル・ホスト上のデータのインデックスを再作成します。 複数のホスト上のデータのインデックスの再作成が必要な場合は、各ホストでスクリプトを個別に実行する必要があります。
Steps
この例では、ログ・アクティビティー・ペインに表示されない以下のディレクトリーにある 2 年分のイベントのインデックスを再作成する方法を示します。
/store/ariel/events/records/yyyy/mm/dd/
/store/ariel/events/payloads/yyyy/mm/dd/
- QRadar コンソールに SSH 接続します。
- データを検証するには、du ユーティリティーを使用して、さまざまな年、月、日の使用容量を検査します。
du -xchd 1 /store/ariel/events/records/ du -xhcd 1 /store/ariel/events/payloads/
- 2 年分のインデックスを作成し直すには、まず ariel に書き込まれた完全な時間枠を特定する必要があります。最後のイベントが 2022 年 7 月 17 日午後 5 時に書き込まれたことを確認できた場合、以下の引数でスクリプトを使います。
/opt/qradar/bin/ariel_offline_indexer.sh -n events -t "2022/07/17 17:00" -a -s -d 1051200
この最後の例では、2022 年 7 月 17 日午後 5 時から開始して 1051200 分 ( 正確に 2 年 ) 遡り、イベントのデータベースに影響を与えるスクリプトをリクエストしました ( フローのインデックスも再作成できます ) 。 -
インデックスの再作成が必要なイベントがそれほど過去にさかのぼらず、例えば現在の日付に最後に書き込まれたものであれば、次のようにスクリプトを実行する必要があります。
/opt/qradar/bin/ariel_offline_indexer.sh -n events -v -s -d 1051200
引数 -t が指定されていないため、スクリプトは今日の日付から 1051200 分 ( 2 年 ) 遡って開始すると想定します。
結果
スクリプトが終了すると、そのアクティビティーの概要が表示されます。出力例 :Mar 20, 2023 3:20:57 PM com.mchange.v2.log.MLog <clinit> INFO: MLog clients using java 1.4+ standard logging. Mar 20, 2023 3:20:57 PM com.mchange.v2.c3p0.C3P0Registry banner INFO: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true; trace: 10] Mar 20, 2023 3:20:58 PM com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource getPoolManager INFO: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> com.q1labs.frameworks.core.FrameworksC3P0ConnectionDebugger, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName -> 2k2sy6av4o5ag1mj6962|74a4b8fd, debugUnreturnedConnectionStackTraces -> true, description -> null, driverClass -> org.postgresql.Driver, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, identityToken -> 2k2sy6av4o5ag1mj6962|74a4b8fd, idleConnectionTestPeriod -> 300, initialPoolSize -> 5, jdbcUrl -> jdbc:postgresql://127.0.0.1/qradar, maxAdministrativeTaskTime -> 60, maxConnectionAge -> 0, maxIdleTime -> 0, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, maxStatementsPerConnection -> 50, minPoolSize -> 3, numHelperThreads -> 3, numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null, properties -> {user=******, password=******}, propertyCycle -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 1200, usesTraditionalReflectiveProxies -> false ] Creating /store/ariel/events/records/2023/3/20/15/super/DestinationPort~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/HasIdentity~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/DeviceId~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/DeviceType~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/Category~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/DestinationIP~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/UserName~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/CREEventList~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/PartialMatchList~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/SourceIP~0 - done Creating /store/ariel/events/records/2023/3/20/15/super/Qid~0 - done ...
Additional Information
このユーティリティーの使用には長時間かかる可能性があるため、ターミナル・セッションへの接続が失われたり切断された場合にスクリプトが中断されないように、スクリーン・セッション内で実行することをお勧めします。
Red Hat Enterprise Linux ( RHEL ) 内でプロセスを調整でき、このツールを使用して PID が特定されたら、新しい適切な番号を割り当ててより多くのリソースを割り当てることができることを覚えておいてください。
ps -ef | grep -i offline_indexer
renice -n -20 -p PID
もう 1 つの便利な点は、「バッチ・モード」 ( -b ) を使用して引数を渡すことができます。 引数の特定のリストを含むファイルを作成する必要があります。各実行は行で区切られており、-b と構成ファイルの名前を追加して実行できます。 この場合も、進行状況と結論がリストされますが、実行が終了すると構成ファイルが削除されます。
Related Information
Document Location
Worldwide
[{"Type":"MASTER","Line of Business":{"code":"LOB24","label":"Security Software"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSBQAC","label":"IBM Security QRadar SIEM"},"ARM Category":[{"code":"a8m0z000000cwt8AAA","label":"Ariel"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Product Synonym
SIEM QRadar
Was this topic helpful?
Document Information
Modified date:
08 November 2023
UID
ibm17009289