Skip to content
Export guide · SIEM

How to export your Elastic Security configuration, and what we check in it

Where you run it: Kibana (in the browser), or curl against the Kibana API.

In short

Elastic Security configuration export: the file Elastic Security writes of its own settings, which a configuration review reads setting by setting without connecting to Elastic Security.

How to export the Elastic Security configuration, step by step, what the review checks in the file (55 checks run), and what it does not read.

The fileNDJSON: one .ndjson file, one JSON object per line. Elastic: "Each line in the file represents an object (a rule, exception list parent container, or exception list item), and the last line includes a summary of what was exported"; the connectors the rules use are in the file too
Checks run on it55
Highest grade its findings reachOBSERVED
Feeds attack pathsNo
Not read from this export3 areas, listed below

Sources: Elastic Security documentation (1); Elastic Security documentation (2); the vendor table.

How to export it

Who can pull it
A Kibana role with Read on detection rules in the space that holds them: Read for the Rules and Exceptions feature (Elastic Stack 9.4 and later), for the Rules, Alerts, and Exceptions feature (9.3), or for the Security feature (9.0 to 9.2); on Elastic Cloud Serverless a role that views rules, for example Viewer. Read is enough because exporting reads rules: Elastic describes Read for Rules as "View detection rules (including the Rules table, rule details, and rule monitoring)", and the export route in Kibana’s source asks for the rules read privilege and no other.
Time
About 5 minutes.
The file
NDJSON: one .ndjson file, one JSON object per line. Elastic: "Each line in the file represents an object (a rule, exception list parent container, or exception list item), and the last line includes a summary of what was exported"; the connectors the rules use are in the file too

In the Elastic Security console

  1. Rules → Detection rules (SIEM) → in the Rules table, select the rules you want to export → Bulk actions → Export: the rules are exported to an .ndjson file (Elastic: "find Detection rules (SIEM) in the navigation menu or by using the global search field"; before releases 9.2.6 and 9.3.1 the page is called Rules. To export every rule, select Select all x rules, the control Elastic names for bulk actions, before you open Bulk actions)

    The vendor's page, checked 2026-11-11

Or from the command line

  1. curl -X POST "<kibana-url>/api/detection_engine/rules/_export" -H 'kbn-xsrf: true' -u <your-kibana-username> -o elastic-rules.ndjson(curl asks for your password; the command signs in with your user name and password, so no API key is created. <kibana-url> is the address of your Kibana, for example https://kibana.example.com:5601; Elastic’s own sample uses localhost:5601. If your rules are in a Kibana space other than the default one, put /s/<space-id> before /api: Elastic gives the path as /s/{space_id}/api/detection_engine/rules/_export, and the space’s URL identifier "becomes part of the Kibana URL when you are inside that space". With no list of rules in the request, every rule is exported: "Exports all rules when unspecified")

    The vendor's page, checked 2026-11-11

What the file looks like

NDJSON: one .ndjson file, one JSON object per line. Elastic: "Each line in the file represents an object (a rule, exception list parent container, or exception list item), and the last line includes a summary of what was exported"; the connectors the rules use are in the file too. It varies with the number of rules and the length of their investigation guides. The upload takes files up to 10 MB; if yours is larger, filter the rules list with the Enabled rules filter and export those

What it holds: The exported detection rules (queries, schedules, severities, actions) and, as Elastic writes, "any actions, connectors, and exception lists related to the exported rules", as NDJSON.

On Kibana 8.17 and earlier, Elastic’s prebuilt rules are left out of every export (just your own rules are written), so the review sees fewer rules and may report coverage gaps those prebuilt rules fill. From 8.18 on, prebuilt rules are exported too.

Afterwards

The steps create no key, token or account, so there is nothing to revoke in Kibana. Delete the .ndjson file (elastic-rules.ndjson from the curl command) from your computer once the upload has gone through.

If the export goes wrong

What you seeThe fix
curl answers 401 (Unauthorized).Check the user name and password: the command uses basic authentication, which Elastic builds from "your username:password". If you sign in to Kibana through single sign-on and have no password, export from the Detection rules (SIEM) page instead (the console step).
The .ndjson holds no rules (just the summary line), or fewer rules than Kibana shows.Your rules are in another Kibana space: add /s/<space-id> before /api in the URL, or open that space in Kibana and export from its Detection rules (SIEM) page.
The Detection rules (SIEM) page is missing, or curl answers 403 Forbidden.Your role cannot read detection rules: ask a Kibana administrator for Read on the Rules and Exceptions feature in that space (Elastic Stack 9.4 and later; on 9.3 the Rules, Alerts, and Exceptions feature; on 9.0 to 9.2 the Security feature).

What we read from it

Checks run
55 + 18 guidance items, not counted
Formats read
Detection rules NDJSON export
Releases
8.x to current

Checks run is the number of checks that reached a result on this system's own export in our tests, as the vendor table shows it.

The areas checked

  • Detection rules: enabled or disabled, MITRE ATT&CK mapping, interval and look-back, actions, exceptions, severity
  • Coverage by tactic, for example Persistence

The grade its findings reach

Observed Findings from this file are OBSERVED: read from the system's own export and cited to the setting.

Its findings stay in the review and its reports. Elastic Security does not feed attack paths.

Attack paths, the one change and dollar figures are MODELED. How each grade is worked out is on the method page.

What we do not read from this export

  • How often each rule fired (alert indices)
  • The query inside each rule, in depth
  • Exception list items in depth: just the exception values written in each rule are checked
  • Which rules are Elastic’s prebuilt rules and whether they are up to date: every exported rule is read the same way

Limits of the reader

  • If your export leaves a section out, the review does not flag it as partial.
  • Findings stay in the review. They do not feed attack paths.
  • The checks of this system are not counted: a check counts once a test shows it firing on a file in the layout the vendor documents.

A finding never comes from what the file does not hold: live traffic, running hosts and logs are not in a configuration export.

Questions

Who can export the Elastic Security configuration?

A Kibana role with Read on detection rules in the space that holds them: Read for the Rules and Exceptions feature (Elastic Stack 9.4 and later), for the Rules, Alerts, and Exceptions feature (9.3), or for the Security feature (9.0 to 9.2); on Elastic Cloud Serverless a role that views rules, for example Viewer. Read is enough because exporting reads rules: Elastic describes Read for Rules as "View detection rules (including the Rules table, rule details, and rule monitoring)", and the export route in Kibana’s source asks for the rules read privilege and no other.

Does the export change anything?

No key, token or account is created: the console export downloads a file, and the curl command signs in with your user name and password. Elastic describes the call as "Export detection rules to an .ndjson file", and the export route in Kibana’s source asks for the rules read privilege and no other.

Does the file hold passwords or keys?

No connector credentials. Elastic: "sensitive information about the connector (such as authentication credentials) is not included". The file does hold each rule’s query and index patterns, the exception lists, and the actions and connectors the rules use. Value lists are not in the file. With redaction on (the default), the passwords, keys and tokens the review recognises are replaced with a placeholder before anything is stored; the check before upload shows how many it found.