Migration Tools

Overview

Migration Tools translate Splunk Processing Language (SPL) into Datadog log search syntax and convert Splunk assets into their Datadog equivalents. Migration Tools include:

ToolUse case
TranslateTranslate a single SPL query and see the Datadog equivalent with an explanation of the translation.
ImportImport CSV exports of Splunk alerts and dashboards, and translate their queries to log search syntax. Review the results, then create the matching Datadog monitors and dashboards.

Migration Tools support only Splunk as a source platform. They parse and convert queries deterministically with translation libraries, not a large language model. Each query is translated into log search syntax when possible for use with the Log Explorer, log monitors, and dashboard widgets. Analytically complex queries that log search syntax cannot express fall back to DDSQL.

Permissions

Importing Splunk assets requires the logs_read_config permission. Publishing a translated resource also requires the permission for the asset being created: monitors_write for monitors, and dashboards_write for dashboards. See Datadog Role Permissions.

Translate a single query

Use the Translate page as a sandbox for SPL. It is designed for exploring translation behavior rather than for migrating an inventory of assets.

  1. Go to Logs > Translate.
  2. Paste an SPL query into the query box, or select one of the provided examples.
  3. Click Translate.

The page returns:

  • Translated query: The Datadog query, in log search syntax or DDSQL, shown in the search bar above the Translation preview chart.
  • Translation preview: The data matching the translated query, over a time range you specify. Click View in Log Explorer to continue in the Log Explorer.
  • Translated SPL: Your original SPL, annotated with anything the translator changed or could not translate, such as stripped indexes or unsupported commands.
  • How did we translate?: An explanation of which SPL command maps to which part of the Datadog query.

To build a monitor on the translated query, click Create Monitor.

Migrate assets in bulk

The Import page migrates many Splunk assets at once. You upload your Splunk inventory as CSV files, and the tool groups them into a named import. It translates the queries in each asset to Datadog syntax and builds the matching Datadog monitor or dashboard. You review each result, then publish it to create the asset in Datadog. The following resource types are supported:

Splunk resourceDatadog equivalentNotes
Alert (saved search)MonitorTranslates to a log monitor when possible. Otherwise, it translates to an analysis monitor with a DDSQL query.
DashboardDashboardBoth Studio (JSON) and Classic (XML) dashboards are supported. Each panel is translated into a separate widget.
Search macroNoneBefore translation, the tool replaces each macro reference in your alerts and dashboards with the macro’s SPL definition. Macros are not published as Datadog assets.

Export your assets from Splunk

Export each resource type from Splunk as a separate CSV file:

  1. Sign in to Splunk and open the Search app.

  2. Run the query for the resource type you want to export:

    Alerts:

    | rest /services/saved/searches splunk_server=local
    | table
      title
      eai:acl.owner
      eai:acl.app
      search
      triggered_alert_count
      alert_condition
      alert_threshold
      alert_comparator
      alert_type
      actions
      action.email.to
      action.email.message.alert
      action.slack.param.channel
      action.slackparam.message
      description
    

    Dashboards:

    | rest /servicesNS/admin/search/data/ui/views
    | spath input=eai:data path=dashboard.definition output=definition
    | spath input=eai:data path=dashboard output=dashboard_xml
    | where isnotnull(definition) OR (isnull(definition) AND isnotnull(dashboard_xml))
    | eval result=if(isnotnull(definition), definition, 'eai:data')
    | eval type=if(isnotnull(definition), "studio", "legacy")
    | eval title=if(type=="studio", json_extract(result, "title"), null())
    | eval description=if(type=="studio", json_extract(result, "description"), null())
    | spath input=result path=dashboard.label output=xml_title
    | spath input=result path=dashboard.description output=xml_description
    | eval title=coalesce(title, xml_title)
    | eval description=coalesce(description, xml_description)
    | fields type,title,description,result
    

    Macros:

    | rest /servicesNS/-/-/admin/macros count=0 splunk_server=local
    | table definition author disabled title args updated eai:appName validation
    
  3. Confirm the results contain the assets you want to migrate.

  4. Above the results, click the export button, select the CSV format, and download the file.

  5. Repeat for each resource type. Export the macros query if any of your alerts or dashboards use search macros.

The same instructions, with screenshots of the Splunk UI, are available in the import wizard under How to export your assets from Splunk?.

Import your assets into Datadog

  1. Go to Logs > Import and click Get Started.
  2. In Select source, select Splunk Processing Language (SPL).
  3. In Upload your assets from Splunk, add your alert and dashboard CSV files. Upload as many files as you need, but leave the macros file out of this step.
  4. In Macros file, upload the macros CSV, if you have one.
  5. In Name your import, give the import a name that identifies it later.
  6. Click Import.

Translation starts as soon as the import is created and runs in the background. You can close the page and come back to it.

Review and publish

Open an import to see every resource it contains and the state of its translation:

StatusMeaning
In ProgressThe resource is being translated.
TranslatedA Datadog equivalent is ready to review and publish.
PublishedThe resource exists in Datadog. The import links to it.
SkippedThe resource could not be translated.

Click a resource to see its original SPL, the translated query, and the explanation of the translation. A translated query is not guaranteed to return the same results as the Splunk original. Review each translation before you publish the monitor or dashboard.

A dashboard shows a status for each of its widgets and publishes as a single dashboard. Open it to see which widgets were translated and which returned an error.

Monitors and dashboards with the Skipped status cannot be published, and a translation cannot be edited in Datadog before it is published. To correct a skipped resource, or a dashboard widget that returned an error, fix it at the source and import it again:

  1. Correct the asset in Splunk and export it again, or edit the exported CSV directly. Editing the CSV is often faster for a small fix, such as renaming an index or attribute to match the one in Datadog.
  2. (Optional) Delete the original import to reuse its name. On the Import page, hover over the import, click the trash can icon, and then click Delete current migration.
  3. Upload the corrected file as a new import.

Translation gaps

Translation converts SPL to Datadog log search syntax but does not guarantee identical results. These gaps account for most of the differences:

Logs have a different shape in each platform
Pipelines, processors, and log-shipping agents differ between the two platforms. As a result, the attributes available on a log differ. The translator preserves attribute names as written, except when mapping standard attributes. If a Datadog pipeline does not produce an attribute the Splunk query relies on, the translated query returns no results. To fix this, add processors to your Datadog pipelines that produce the attribute. For example, use a Grok parser to extract it from the message, or a remapper to rename an existing attribute.
Indexes do not match
Splunk index names rarely map one-to-one to Datadog log indexes. An index filter that does not resolve results in a query error. The translator strips index terms that have no Datadog equivalent and flags them as a warning. Review the warning and scope the query with tags or attributes instead.
There is not enough sample data
A query that runs against an index with little matching data returns an empty preview. An empty preview makes the translation hard to verify. Confirm that relevant logs are in Datadog before you assess a translation.
The SPL command is not supported
Migration Tools support a wide range of SPL commands. When a command does not have a Datadog equivalent, the translator returns as much of the query as it can and flags the unsupported command.

Further reading