> ## Documentation Index
> Fetch the complete documentation index at: https://clickhouse.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> Store ClickHouse Cloud audit logs into Splunk.

# Storing ClickHouse Cloud audit logs into Splunk

export const PartnerBadge = () => {
  return <div className="PartnerBadge">
            <div className="PartnerBadgeIcon">
                <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <polyline points="12.5 9.5 10 12 6 11 2.5 8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="4.54 4.41 8 3.5 11.46 4.41" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M2.15,3.78 L0.55,6.95 A0.5,0.5 0,0,0 0.77,7.62 L2.5,8.5 L4.54,4.41 L2.82,3.55 A0.5,0.5 0,0,0 2.15,3.78 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M13.5,8.5 L15.23,7.62 A0.5,0.5 0,0,0 15.45,6.95 L13.85,3.78 A0.5,0.5 0,0,0 13.18,3.55 L11.46,4.41 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M11.5,4.5 L9,4.5 L6.15,7.27 A0.5,0.5 0,0,0 6.24,8.05 C7.33,8.74 8.81,8.72 10,7.5 L12.5,9.5 L13.5,8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="7.75 13.5 5.15 12.85 3.5 11.67" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                </svg>
            </div>
            Partner Integration
        </div>;
};

export const Image = ({img, alt, size = "lg", background}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  const backgroundColor = background === "white" ? "white" : background === "black" ? "rgb(31 31 28)" : undefined;
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} style={{
    backgroundColor
  }} />
      </Frame>
    </div>;
};

<PartnerBadge />

[Splunk](https://www.splunk.com/) is a data analytics and monitoring platform.

This add-on allows you to store the [ClickHouse Cloud audit logs](/docs/products/cloud/reference/security/audit-logging) into Splunk. It uses [ClickHouse Cloud API](/docs/products/cloud/features/admin-features/api/api-overview) to download the audit logs.

This add-on contains only a modular input, no additional UI are provided with this add-on.

# Installation

<h2 id="for-splunk-enterprise">
  For Splunk Enterprise
</h2>

Download the ClickHouse Cloud Audit Add-on for Splunk from [Splunkbase](https://splunkbase.splunk.com/app/7709).

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_001.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=56a33ee3a13a8300dbb067adce5fa5c5" size="lg" alt="Splunkbase website showing the ClickHouse Cloud Audit Add-on for Splunk download page" border width="2600" height="722" data-path="images/integrations/tools/data-integration/splunk/splunk_001.webp" />

In Splunk Enterprise, navigate to Apps -> Manage. Then click on Install app from file.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_002.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=5b57e750b6d0e1dea406ca54315b7a22" size="lg" alt="Splunk Enterprise interface showing the Apps management page with Install app from file option" border width="2998" height="800" data-path="images/integrations/tools/data-integration/splunk/splunk_002.webp" />

Select the archived file downloaded from Splunkbase and click on Upload.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_003.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=8125951b3708a7b6d18a81969e287bf8" size="lg" alt="Splunk app installation dialog for uploading the ClickHouse add-on" border width="1404" height="724" data-path="images/integrations/tools/data-integration/splunk/splunk_003.webp" />

If everything goes fine, you should now see the ClickHouse Audit logs application installed. If not, consult the Splunkd logs for any errors.

# Modular input configuration

To configure the modular input, you'll first need information from your ClickHouse Cloud deployment:

* The organization ID
* An admin [API Key](/docs/products/cloud/features/admin-features/api/openapi)

<h2 id="getting-information-from-clickhouse-cloud">
  Getting information from ClickHouse Cloud
</h2>

Log in to the [ClickHouse Cloud console](https://console.clickhouse.cloud/).

Navigate to your Organization -> Organization details. There you can copy the Organization ID.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_004.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=c9c20c91666458d734f3053314f37b7d" size="lg" alt="ClickHouse Cloud console showing the Organization details page with Organization ID" border width="1018" height="482" data-path="images/integrations/tools/data-integration/splunk/splunk_004.webp" />

Then, navigate to API Keys from the left-end menu.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_005.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=448a9a27f3ee2fae15f22a50a5b0bfc5" size="lg" alt="ClickHouse Cloud console showing the API Keys section in the left navigation menu" border width="1662" height="516" data-path="images/integrations/tools/data-integration/splunk/splunk_005.webp" />

Create an API Key, give a meaningful name and select `Admin` privileges. Click on Generate API Key.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_006.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=abe804a30429410da956dd1fb1d2dbcc" size="lg" alt="ClickHouse Cloud console showing the API Key creation interface with Admin privileges selected" border width="654" height="406" data-path="images/integrations/tools/data-integration/splunk/splunk_006.webp" />

Save the API Key and secret in a safe place.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_007.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=6869ebc678f5e97ec337dee1f0e794ce" size="lg" alt="ClickHouse Cloud console showing the generated API Key and secret to be saved" border width="1198" height="583" data-path="images/integrations/tools/data-integration/splunk/splunk_007.webp" />

<h2 id="configure-data-input-in-splunk">
  Configure data input in Splunk
</h2>

Back in Splunk, navigate to Settings -> Data inputs.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_008.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=3613b4a21c575b5c7c49a4dee917ec30" size="lg" alt="Splunk interface showing the Settings menu with Data inputs option" border width="2986" height="1334" data-path="images/integrations/tools/data-integration/splunk/splunk_008.webp" />

Select the ClickHouse Cloud Audit Logs data input.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_009.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=a1c860cbc07f35784d120449bc0d2a2b" size="lg" alt="Splunk Data inputs page showing the ClickHouse Cloud Audit Logs option" border width="2978" height="590" data-path="images/integrations/tools/data-integration/splunk/splunk_009.webp" />

Click "New" to configure a new instance of the data input.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_010.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=02d7c54640801d80248c38826a5826c7" size="lg" alt="Splunk interface for configuring a new ClickHouse Cloud Audit Logs data input" border width="2140" height="1064" data-path="images/integrations/tools/data-integration/splunk/splunk_010.webp" />

Once you have entered all the information, click Next.

<Image img="https://mintcdn.com/private-7c7dfe99/6s0zAeps_NYZmK2e/images/integrations/tools/data-integration/splunk/splunk_011.webp?fit=max&auto=format&n=6s0zAeps_NYZmK2e&q=85&s=87ecf7553a2e00bc3e53400726925061" size="lg" alt="Splunk configuration page with completed ClickHouse data input settings" border width="2192" height="932" data-path="images/integrations/tools/data-integration/splunk/splunk_011.webp" />

The input is configured, you can start browsing the audit logs.

# Usage

The modular input stores data in Splunk. To view the data, you can use the general search view in Splunk.

<Image img="https://mintcdn.com/private-7c7dfe99/XJAlwu-tcr9cBsLZ/images/integrations/tools/data-integration/splunk/splunk_012.webp?fit=max&auto=format&n=XJAlwu-tcr9cBsLZ&q=85&s=35b61457e18e59e5dabe15a293b75256" size="lg" alt="Splunk search interface showing ClickHouse audit logs data" border width="1605" height="764" data-path="images/integrations/tools/data-integration/splunk/splunk_012.webp" />
