dump
Estimated time to read: 2 minutes
Experimental-feature notice
This page discusses experimental features. Experimental features are still in progress, and you may encounter bugs or unexpected behavior when using them.
If you experience an issue or want to know more about this feature's status, reach out to us at Era Software.
Acquisition notice
In October 2022, ServiceNow acquired Era Software. The documentation on this site is no longer maintained and is intended for existing Era Software users only.
To get the latest information about ServiceNow's observability solutions, visit their website and documentation.
This command reads data from the EraSearch API and writes it to a local file.
Warning
This is an advanced command and has the potential to generate a lot of data, please use it with care. This command also requires read access from any indexes queried from in order to retrieve data.
usage: eractl dump [-h] [--url URL] [--key KEY] [-i INDEX] [--start-ts START_TS] [--stop-ts STOP_TS] [--sort-by SORT] [--sort-order SORT_ORDER] [--query QUERY] [--limit LIMIT] [-o OUTPUT_FILE]
optional arguments:
-h, --help show this help message and exit
--url URL EraSearch URL, set via environment with ERACTL_URL (default: http://localhost:9200)
--key KEY EraSearch API key, set via environment with ERACTL_API_KEY (default: None)
-i INDEX, --index INDEX
EraSearch index name to query from (default: *)
--start-ts START_TS The starting timestamp in ISO8601 format (default: None)
--stop-ts STOP_TS The stopping timestamp in ISO8601 format (default: None)
--sort-by SORT How to sort results (in descending order) (default: _ts)
--sort-order SORT_ORDER
Use ascending order (default: asc)
--query QUERY Lucene query to use for filtering results (default: None)
--limit LIMIT Batch size to use for querying data (default: 5000)
-o OUTPUT_FILE Output file path (default: ./output.YYYY-MM-DD[...].json)
To run:
export ERACTL_ADVANCED_COMMANDS="true"
eractl dump --url https://erasearch.example.com --key ****** -i my-index --query "field_name:prefix*" --start-ts 2022-05-06T00:00:00Z --stop-ts 2022-05-07T00:00:00Z
Or to pass arguments from the environment:
export ERACTL_URL="https://erasearch.example.com"
export ERACTL_API_KEY="******"
export ERACTL_ADVANCED_COMMANDS="true"
eractl dump -i my-index --query "field_name:prefix*" --start-ts 2022-05-06T00:00:00Z --stop-ts 2022-05-07T00:00:00Z
With the example arguments above, the data retrieved will:
- Be from the
my-index
index - Match the
field_name:prefix*
Lucene query - Be within the
2022-05-06
and2022-05-07
time boundaries