Skip to main content

Connect external data

AI summary
Explains how to set up and manage external data connections in Imply Lumi to query data in your Amazon S3 storage. Covers creating connections through the wizard, configuring S3 locations, and querying external data. Details how to use Lumi search and Splunk® federated search with virtual compute pools.

About AI summaries.

An external data connection lets Imply Lumi query data that stays in your own Amazon S3 storage without ingesting it into Lumi. The external data feature is also known as Loglake. This topic explains how to create, manage, and query an external data connection. For how the external data feature works and when to use it, see External data overview.

Prerequisites​

To connect external data, you need the following:

  • A default virtual compute pool. See Default virtual compute pool.
  • Lumi user with the Admin role. For information on roles and permissions, see Use roles to control access.
  • Source logs in an S3 bucket and an S3 location where Lumi can write its index.
  • AWS user with permission to create IAM roles and policies.

Connect external data​

You connect external data through the connection wizard. Lumi saves your progress as a draft as you go, so you can leave the wizard and finish later.

To start, go to External data in the Lumi navigation menu, then click Create connection to open the wizard. If you don't see External data in the menu, contact your Imply support representative.

Name the connection and attach keys​

On the Naming & access page, name the connection and attach the IAM keys for Splunk® federated search:

  1. Set the connection details:
    • Name: Name to identify the connection. Use 3 to 40 characters: lowercase letters, digits, and hyphens. You can't change this after you create the connection.
    • Description: Optional description to identify the connection.
  2. In Attach IAM keys, create or assign the keys that can query the data from Splunk. You only need a key to query the data through Splunk federated search. You can search the data in Lumi without a key. We recommend creating a new IAM key for each connection, and using that key to provision a federated provider in Splunk. For how keys route to pools and which keys you can attach, see Keys and pools.
  3. Click Next.

Create an external data connection

Set the logs location​

On the Logs location page, point Lumi to your source data. Lumi only reads from this location and never writes to it.

If you're connecting to Splunk Dynamic Data Self Storage (DDSS), check the self-storage location in your Splunk index settings to find the S3 bucket and path for each index.

  1. Under Location, set the following:
    • Region: AWS region where your logs are stored.

    • Bucket: S3 bucket that holds your logs.

    • Path: Path to your logs within the bucket. You can use glob patterns to match multiple paths or objects. For example:

      path/to/index/**
  2. Configure an IAM role in your AWS account that Lumi can use to read your logs. You can create a role using the policies from the wizard, or add the equivalent configuration to an existing role:
    1. Copy the Trust policy from the wizard and add it to the role. The trust policy lets Lumi assume the role, secured by a unique external ID.
    2. Copy the Inline permissions from the wizard and add them to the role. Lumi uses these permissions to read your logs in the specified S3 bucket. If your logs bucket uses AWS KMS server-side encryption (SSE-KMS), also add the kms:Decrypt permission for the bucket's KMS key.
    3. Copy the role ARN.
  3. Enter the Role ARN.
  4. Click Verify access. Once Lumi verifies access, File preview lists the files at the path.
  5. Click Next.

Set the index location​

On the Indexing page, set the S3 location where Lumi writes a compressed copy of your data and its search indexes. Unlike the logs location, Lumi reads from and writes to this location.

note

Lumi may overwrite existing files at the index path. Use an empty path that only Lumi writes to.

  1. Under Location, set the following:

    • Region: AWS region for the index location.
    • Bucket: S3 bucket where Lumi writes the index.
    • Path: Path to the index within the bucket. A path is required, and it can't be the bucket root. If the index and your logs share a bucket, set the index path outside the logs path so Lumi doesn't read index files as logs.
  2. Configure an IAM role in your AWS account that Lumi can use to write the index. You can create a role using the policies from the wizard, or add the equivalent configuration to an existing role:

    1. Copy the Trust policy from the wizard and add it to the role. The trust policy lets Lumi assume the role, secured by a unique external ID.
    2. Copy the Inline permissions from the wizard and add them to the role. Lumi uses these permissions to read and write the index. If your index bucket uses AWS KMS server-side encryption (SSE-KMS) as its default encryption, also add the kms:Decrypt and kms:GenerateDataKey permissions for the bucket's KMS key. We recommend adding these permissions whenever you use SSE-KMS with the index bucket.
    3. Copy the role ARN.
  3. Enter the Role ARN.

  4. Click Verify access. Once Lumi verifies access, File preview lists the files at the path.

  5. Select an Indexing mode:

    • Eager: Lumi indexes new files in the background as it discovers them. Queries return only data Lumi has already indexed.
    • Lazy: Lumi indexes data when you query it.

    In both modes, Lumi proactively checks your logs location for new files.

    For production workloads, use eager mode so queries don't wait for indexing.

    Lumi doesn't re-index files it has already indexed when the contents of your logs location change. For more information, see Edit a connection.

  6. Click Next.

Transform and connect​

On the Transformation page, tell Lumi how to read and process your files. Configure the file type, index attribute, and processing, then check the sample preview and complete the connection.

File type​

The file type you select determines how Lumi reads your data, which fields it extracts, and how you search the data.

  1. In File type, select the format of your files.
  2. Configure the options for your file type. For the settings for each file type, see External event formats reference.

Index attribute​

In Index attribute, enter a value for the index attribute. If your events already contain an index attribute, Lumi overrides it with this value. If your events don't contain one, you must set a value here to make the events searchable.

To search the data through Splunk federated search, include the index attribute in your query. For example, if the index attribute is parquet-logs, search with index=parquet-logs.

If you leave Index attribute blank, Lumi doesn't change the index field, so events keep their own index. You must set an index attribute to query CSV, JSON, Parquet, and plain text files. HEC and Splunk DDSS events carry their own index, so the index attribute is optional for them.

Processing​

Under Processing, you can add a pipeline to enrich your events with additional attributes. Lumi runs the pipeline when it indexes your data, and stores the pipeline output with its compressed copy of your data in the index location. Pipelines and processors work the same way for external data as for managed data. For more information, see Transform events using pipelines.

You can do either of the following:

  • Click Create pipeline to build a new pipeline.
  • Click Import pipeline to import a predefined or custom pipeline. You can import a top-level pipeline or one of its nested pipelines.

When you import a pipeline, Lumi doesn't import its condition. The imported pipeline runs on all the connection's events. You can add conditions after you import it. Conditions on any nested pipelines it contains still apply.

Many pipelines, including nested predefined pipelines, match events on sourcetype. Unlike managed data, external data events don't get a sourcetype from an IAM key, so they only have one if your data includes it. If your events don't have a sourcetype, do one of the following:

  • Import the nested pipeline for your log type directly, instead of its parent.
  • Add a value mapper to set sourcetype before any processors that depend on it.

Preview and connect​

  1. Check the Sample preview to confirm Lumi parses your data as expected. Preview sampling reads the first 100 files or 10,000 events, whichever comes first.
    • The Parsed events tab shows the events Lumi extracts. Click an event to see its details and attributes. Preview an external data connection
    • The Files tab shows the source files sampled.
  2. Click Connect.

Lumi creates the connection. In eager mode, Lumi begins indexing your data. In lazy mode, Lumi indexes the data when you first query it.

To track indexing progress, see View connection status. On the main External data page, the Indexing status column shows Active or Error. For what each status means, see View connection status.

External data connections

Query unavailable in the Keys column means the connection has no IAM keys attached, so you can't query it through Splunk federated search. You can still query the data in Lumi. To query the data from Splunk, attach a key.

Manage connections​

After you create a connection, you can view its status, edit it, or delete it from the External data page.

View connection status​

To view a connection's status, go to External data and click the connection's name. The Status panel shows what Lumi has found in the logs location and how much of it Lumi has processed.

The status badge shows one of the following:

  • Error: Lumi can't discover files in the logs location, for example because access is denied, or at least one event batch failed to compress or index. A discovery error shows even if Lumi has already indexed all the files it found. See the Errors tile for details.
  • Active: Lumi has no errors for the connection. Active doesn't mean indexing is complete. For example, a lazy mode connection is Active before you query it, even though Lumi hasn't indexed any files. To check indexing progress, see the Progress tile.

Draft connections don't show a status.

External data status

Discovered shows the data Lumi found in the logs location:

  • Files: Number of files in the logs location.
  • Event batches: Number of event batches. An event batch is a group of files that Lumi processes together.
  • Input size: Total size of the files in the logs location, as stored. Source files are often compressed.

Processed shows the data Lumi has indexed:

  • Progress: Number of event batches Lumi has processed, out of all discovered event batches.
  • Time range: Earliest and latest event times in the processed data.
  • Indexes: Indexes Lumi writes the events to. Use these values to query the data.
  • Events: Number of events Lumi has processed.
  • Raw size: Uncompressed size of the source files.
  • Compressed size: Size of Lumi's compressed copy of your data, including any enrichments. Lumi stores this copy in the index location.
  • Index size: Size of the search indexes. Lumi stores the search indexes in the index location and can rebuild them from the compressed copy.

Errors lists any problems that stop Lumi from finding or indexing files in the logs location.

Edit a connection​

To edit a connection, go to External data and click the connection's name. If you enter the name of an existing connection in the connection wizard, Lumi opens that connection in edit mode.

You can perform the following actions:

  • Update the transformation options, including the file type, configuration, and pipeline, and run a new sample preview.
  • Change the indexing mode.
  • Change the index attribute. Update any searches that use the previous index attribute.
  • Attach and remove IAM keys.

Lumi re-indexes when the connection configuration changes, not when the contents of your logs location change. For example, if you add files to the logs location of a connection in eager mode, Lumi indexes only the new files.

You can't edit any other connection details. To change anything else, delete the connection and create a new one.

Delete a connection​

To delete a connection, go to External data, click the ellipsis in the connection's row, then click Delete.

Deleting a connection doesn't affect the source logs in your S3 bucket. Lumi doesn't delete the index files at the index location.

Query external data​

You can query external data in Lumi and through Splunk federated search. Lumi serves external data queries through the virtual tier, so each query runs on a virtual compute pool.

If the pool has shut down, the first query incurs a cold start while Lumi provisions compute and loads the data it needs to serve the query. Lumi loads this data into virtual storage, not into your S3, and discards it when the pool shuts down. For more information, see Idle time. To keep a pool running for production queries, see Run production workloads on external data.

You can query external data in the Lumi UI without attaching an IAM key.

  1. Go to Explore.
  2. Select the connection from the drop-down at the top of the page. Selecting the connection limits your search to its data, so you don't need to include the index attribute in your query.
  3. Set the time range and enter your query.

Lumi search queries on external data run on the default virtual compute pool. Lumi runs these queries with your Lumi user credentials, so the IAM keys attached to the connection and their pools don't apply.

For example:

External data Lumi search

The Attributes panel lists the fields Lumi extracted from your data. The fields available depend on the connection's file type. See Supported file types for more information.

For supported operators and syntax, see Lumi query syntax reference.

To query external data from Splunk, use the IAM key attached to the connection to provision a federated provider in Splunk. For the provider setup steps, see Set up Splunk transparent federated search.

Then query using the connection's index attribute. The following query finds events with index attribute parquet-logs for the past 14 days with the specified status_code, level, and method:

index=parquet-logs status_code=200 level=WARN method=POST earliest=-14d

External data federated search

Federated search queries run on the virtual compute pool assigned to the IAM key you query with.

note

A single IAM key can't query both external and managed data. Create separate keys for each, and provision a separate federated provider in Splunk for each key. See Which keys you can attach for the rules Lumi enforces.

Keys and pools​

Each key routes the external data connection's federated search queries to one virtual compute pool. Lumi search queries always run on the default pool. When you create or attach a key, you select the pool it routes queries to. If the key already serves another connection, changing its pool also changes the pool for that connection's queries.

You can assign a key to only one pool, but a pool can serve multiple keys. Name your pools by intended use. Pools that serve managed data and external data appear together in the Lumi UI, so a clear naming convention helps you tell them apart.

To run different workloads on different pools, attach a separate key for each workload. For example, production searches could run on a larger pool with an idle time that keeps it running, while occasional investigations query the same external data through a smaller pool that shuts down between queries.

Which keys you can attach​

You can only attach a key if either of the following is true:

  • The key has no integrations enabled.
  • The key has the federated search integration and is already attached to an external data connection.

This restriction protects keys that already query managed data through federated search. Attaching such a key to an external data connection could reassign its pool or integration and break those existing queries.

If you attach a key that has no integrations enabled, Lumi adds the federated search integration to it automatically. You don't need to add the integration yourself first.

Learn more​

For more information, see the following topics: