コンテンツにスキップ

Hadoop を使用した調査の設定

概要

Hadoop は、分散コンピューティング環境で実行されるアプリケーションを処理するオープンソースのフレームワークです。Sophos Linux Sensor (SLS) を使用すると、次の手順に従って調査を設定できます。

要件

  • Hadoop Cluster 
  • SLS running in your environment

センサーの設定:

次の設定ファイルを編集します: /etc/sophos/runtimedetections-rules.yaml

HDFS 用のシンクを追加し、センサーがディレクトリを作成できるようにし、フライトレコーダーをオンにします。

次に例を示します。

cloud_meta: auto
blob_storage_create_buckets_enabled: true
investigations:
  reporting_interval: 30s
  sinks:
    -   name: "[namenode hostname/ip]:9000/runtimedetections-investigations/"
      backend: hdfs
      automated: true
      type: parquet
      partition_format: "hostname_partition={{.Hostname}}/date_partition={{.Time.Format \"2006-01-02\"}}"
      credentials:
        blob_storage_hdfs_user: hadoop
flight_recorder:
  enabled: true
  tables:
    -   name: "shell_commands"
      rows: 1000
      enabled: true
    -   name: "tty_data"
      rows: 1000
      enabled: true
    -   name: "connections"
      rows: 2000
      enabled: true
    -   name: "sensor_metadata"
      rows: 500
      enabled: true
    -   name: "alerts"
      rows: 100
      enabled: true
    -   name: "sensors"
      rows: 10
      enabled: true
    -   name: "process_events"
      rows: 4000
      enabled: true
    -   name: "container_events"
      rows: 300
      enabled: true

センサーを再起動し、次のコマンドを実行して、操作に成功したことを確認します。

hdfs dfs -ls /runtimedetections-investigations/ 

設定で有効化されたすべてのテーブルが一覧表示されるはずです。

drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/alerts
drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/connections
drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/container_events
drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/process_events
drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/sensor_metadata
drwxr--r-- - root supergroup 0 2020-10-27 18:33 /runtimedetections-investigations/sensors

SLS 設定の編集:

SLS が正しく設定されたことを確認したら、レポート間隔をより適切な値に変更します。

次に例を示します。

cloud_meta: auto
blob_storage_create_buckets_enabled: true
investigations:
  reporting_interval: 5m
  #...