Fortinet white logo
Fortinet white logo

User Guide

Deleting ClickHouse Organization Data

Deleting ClickHouse Organization Data

The following steps enable you to delete events belonging to an Organization in a Service Provider environment.

As a pre-requisite, collect the Organization Id for the "to-be-deleted" organization and the IP addresses of one data node from each shard.

  1. Logon to any ClickHouse data node.
  2. Run the following command as admin.

    /opt/phoenix/phscripts/clickhouse/clickhouse-delete-org-events.sh <orgId> <data_node_shard1_ip>,<data_node_shard2_ip>

    An example environment is provided below, for which we will run an example command.

    Shard1: Replica1: IP: 172.30.58.242

    Shard1: Replica2: IP: 172.30.58.243

    Shard2: Replica1: IP: 172.30.58.244

    Shard2: Replica2: IP: 172.30.58.245

    Org Id: 2002

    Run the following command:

    /opt/phoenix/phscripts/clickhouse/clickhouse-delete-org-events.sh 2002 172.30.58.242,172.30.58.244

This script uses ClickHouse Lightweight Delete concept, as illustrated here.

Deleting ClickHouse Organization Data

Deleting ClickHouse Organization Data

The following steps enable you to delete events belonging to an Organization in a Service Provider environment.

As a pre-requisite, collect the Organization Id for the "to-be-deleted" organization and the IP addresses of one data node from each shard.

  1. Logon to any ClickHouse data node.
  2. Run the following command as admin.

    /opt/phoenix/phscripts/clickhouse/clickhouse-delete-org-events.sh <orgId> <data_node_shard1_ip>,<data_node_shard2_ip>

    An example environment is provided below, for which we will run an example command.

    Shard1: Replica1: IP: 172.30.58.242

    Shard1: Replica2: IP: 172.30.58.243

    Shard2: Replica1: IP: 172.30.58.244

    Shard2: Replica2: IP: 172.30.58.245

    Org Id: 2002

    Run the following command:

    /opt/phoenix/phscripts/clickhouse/clickhouse-delete-org-events.sh 2002 172.30.58.242,172.30.58.244

This script uses ClickHouse Lightweight Delete concept, as illustrated here.