Data Scrubbing User Guide

A scrub job deletes data permanently. There is no undo, and Kloudfuse keeps no copy of the deleted data.

Prerequisites

  • You need the admin role to create or cancel a scrub job.

  • A job only deletes data that is in sealed segments. Data from the last few minutes to hours is usually still in a consuming segment, and isn’t scrubbed; see Which segments a job processes.

Open the Scrubbing page

In the Kloudfuse UI, select Admin, then Scrubbing. The Scrubbing page lists recent jobs:

Column Content

Job name

The name you gave the job.

Stream

Logs, APM, Metrics, Events, or RUM.

Filters

The label filters of the job, for example kube_service="checkout". All data for a job without filters.

Status

Created, In progress, Completed, Incomplete, Failed, or Cancelled.

Progress

The share of matching rows deleted so far, and the deleted and total counts, for example 0 / 150.

Created

How long ago the job was created.

Time range

The start and end of the data the job deletes.

Select a column header to sort by it; every column except Filters sorts. Use the search box to find a job by name or stream, and the Status and Stream menus to filter the list.

Create a scrub job

  1. On the Scrubbing page, select Create scrubbing job.

  2. Under Stream, select the stream to scrub: LOGS, APM, METRICS, EVENTS, or RUM. A job scrubs one stream. To delete the same service’s logs and traces, create one job for each stream.

  3. Under Time range, select the data to delete. The default is Last 1 hour. Select a quick range, from Last 5 minutes to Last 30 days, or enter From and To times, for example now-26h and now-25h, and select Apply time range. The job deletes rows after the start and up to and including the end.

  4. Under Filters, select a label, an operator, and a value. The label and value lists only offer what exists in the selected time range. Select + Add filter for more filters, the ✕ next to a filter to remove it, or Clear all. The operators are:

    Operator Matches

    =

    Rows whose label equals the value.

    !=

    Rows whose label is set to a different value.

    =~

    Rows whose label matches the regular expression.

    A row must match every filter to be deleted. For RUM, Zapper only accepts = on the application.

    A job without any filter deletes every row of the stream in the time range. The page warns No filters — this would target all logs data in the range., with the stream you selected in place of logs.
  5. Review the Preview. It shows how many rows match, and a sample of them. For Logs, that is the log line count, a Log lines by severity chart, and the matching log lines. Select the Open in link, for example Open in Logs, to explore the matching data on the stream’s page in a new tab. Metrics has no Open in link.

    If nothing matches, the preview shows No data matches the current filters and range.

  6. Select Confirm scrubbing. The button is disabled while the preview loads, and when no data matches.

  7. In Confirm scrubbing job, check the number of rows to delete, the stream, the time range, and the filters.

  8. Enter a Job name: 3 to 50 characters, using only letters, digits, hyphens, and underscores, for example gdpr-request-1234. Use a name that you haven’t used for another job. Start scrubbing job stays disabled until the name is valid.

  9. Select Start scrubbing job.

The job appears in the list in Created status. Processing usually starts within a minute.

Track a scrub job

The Progress column shows the rows deleted against the total counted when the job was created. In 4.4.0 and later, the total includes the rollup rows for Metrics and the error spans for APM, so it is usually larger than the count the preview showed.

The status changes to In progress once the first segments are processed. A job reaches its final status 15 minutes after it last made progress, so it shows In progress for at least 15 minutes after the last segment is done.

To check the result, open the stream’s page with the job’s filters and time range: it should show no matching data, apart from data that was still in a consuming segment.

Cancel a scrub job

You can cancel a job in Created, In progress, or Incomplete status:

  1. On the Scrubbing page, select the ✕ at the end of the job’s row.

  2. In Cancel scrubbing job, select Cancel job.

The job’s status changes to Cancelled, and it stops processing new segments. Rows that it already deleted are not restored, and a segment that a minion is rewriting when you cancel is still replaced.