ElasticsearchEventCollector

Search for and analyze data in real time. Supports version 6 and later.

Database · Elasticsearch

Details

IDElasticsearchEventCollector
ProviderElastic
CategoryDatabase
From Version8.4.0
Docker Imagedemisto/elasticsearch:1.0.0.10133006
Supported ModulesAgentix Cloud Runtime Security XSIAM EDR Cortex Cloud Attack Surface Management Cloud Posture Security Exposure Management

README

Elasticsearch Event Collector integration is used to search for and analyze data in real time.
Supports version 6 and later.

Configure Elasticsearch Event Collector in Cortex

Parameter Description Required
Server URL The Elasticsearch server to which the integration connects. Ensure that the URL includes the correct Elasticsearch port. The default port for Elasticsearch v7 and below is 9200. Use the Server URL for on-premises deployments. False
Authorization type Select the authentication type and enter the appropriate credentials:
- Basic Auth: Enter Username and Password.
- Bearer Auth: Enter Username and Password.
- API Key Auth: Enter the API Key ID and API Key.
True
API key ID Use for API key auth False
API Key Use for API key auth False
Username Use for Basic auth. Optionally you can use Username as an API key ID and Password as an API key for API Key auth. False
Password Use for Basic auth. Optionally you can use Username as an API key ID and Password as an API key for API Key auth. False
Trust any certificate (not secure)   False
Use system proxy settings   False
Client type In some hosted ElasticSearch environments, the standard ElasticSearch client is not supported. If you encounter any related client issues, please consider using the OpenSearch client type. False
Index to fetch events from CSV False
Query String Query string uses the Lucene syntax.
For more information about the Lucene syntax see here.
The query will be used when fetching events. Index time field will be used as a filter in the query.
False
Index time field The time field used for sorting and limiting results. If using a nested field, separate field names with dot notation. False
Raw Query Raw Query allows raw DSL queries and will override the ‘Query String’ Lucene syntax string.
Results will not be filtered or sorted. Use additional parameters in the raw query for these purposes.
For more information about Query DSL see here.
False
Time field type 3 formats supported:
Simple-Date - A plain date string. You must specify the format in which the date is stored.
For more information about time formatting, see here.
Timestamp-Second - A numeric value representing the number of seconds since the Unix epoch (00:00:00 UTC on 1 January 1970). Example: ‘1572164838’
* Timestamp-Milliseconds - A numeric value representing the number of milliseconds since the Unix epoch. Example: ‘1572164838123’
False
Map JSON fields into labels   False
The maximum number of results per fetch   False
Request timeout (in seconds).   False
Fetch events   False

Commands

You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.

es-get-events


Gets events from Elasticsearch.
This command is used for developing/ debugging and is to be used with caution, as it can cause the API request limit to be exceeded.

Base Command

es-get-events

Input

Argument Name Description Required
start_time Start time for fetching events. Supports ISO format (“2023-01-01T23:59:59”) or natural language (“2 hours ago”, “now”). Required
end_time End time for fetching events. Supports ISO format (“2023-01-01T23:59:59”) or natural language (“2 hours ago”, “now”). Optional
time_method For more information see the explanation in the help section. Required
fetch_size The maximum number of results per fetch, default 10. Optional
fetch_index CSV. Optional
fetch_time_field The time field used for sorting and limiting results. If using a nested field, separate field names with dot notation. Required
fetch_query Query string uses the Lucene syntax. Optional
raw_query Raw Query allows raw DSL queries and will override the ‘Query String’ Lucene syntax string. Optional

Context Output

There is no context output for this command.

Configuration parameters

  • url — Server URL (required)
  • auth_type — Authorization type (required)
  • api_key_auth_credentials — API key ID
  • credentials — Username
  • insecure — Trust any certificate (not secure)
  • proxy — Use system proxy settings
  • client_type — Client type
  • fetch_index — Index to fetch incidents from
  • fetch_query — Query String
  • fetch_time_field — Index time field
  • raw_query — Raw Query
  • time_method — Time field type
  • map_labels — Map JSON fields into labels
  • fetch_size — The maximum number of results per fetch
  • timeout — Request timeout (in seconds).
  • isFetchEvents — Fetch events

Commands (1)

  • es-get-events

    This command is used for developing/ debugging and is to be used with caution, as it can cause the API request limit to be exceeded.

category: Database
provider: Elastic
sectionorder:
- Connect
- Collect
commonfields:
  id: ElasticsearchEventCollector
  version: -1
configuration:
- name: url
  display: Server URL
  required: true
  type: 0
  additionalinfo: The Elasticsearch server to which the integration connects. Ensure that the URL includes the correct Elasticsearch port. The default port for Elasticsearch v7 and below is 9200. Use the Server URL for on-premises deployments.
  section: Connect
- name: auth_type
  display: Authorization type
  defaultvalue: Basic auth
  additionalinfo: |-
    Select the authentication type and enter the appropriate credentials:
    - Basic Auth: Enter Username and Password.
    - Bearer Auth: Enter Username and Password.
    - API Key Auth: Enter the API Key ID and API Key.
  options:
  - Basic auth
  - Bearer auth
  - API key auth
  type: 15
  section: Connect
  required: true
- name: api_key_auth_credentials
  additionalinfo: Use for API key auth
  display: API key ID
  displaypassword: API Key
  type: 9
  section: Connect
  required: false
- name: credentials
  additionalinfo: Use for Basic auth. Optionally you can use Username as an API key ID and Password as an API key for API Key auth.
  display: Username
  type: 9
  section: Connect
  required: false
- name: insecure
  display: Trust any certificate (not secure)
  type: 8
  section: Connect
  advanced: true
  required: false
- name: proxy
  display: Use system proxy settings
  type: 8
  section: Connect
  advanced: true
  required: false
- name: client_type
  defaultvalue: Elasticsearch
  additionalinfo: In some hosted ElasticSearch environments, the standard ElasticSearch client is not supported. If you encounter any related client issues, please consider using the OpenSearch client type.
  display: Client type
  options:
  - Elasticsearch
  - OpenSearch
  - Elasticsearch_v8
  - Elasticsearch_v9
  type: 15
  section: Connect
  advanced: true
  required: false
- name: fetch_index
  display: Index to fetch incidents from
  type: 0
  section: Collect
  required: false
  additionalinfo: CSV
- name: fetch_query
  display: Query String
  type: 0
  additionalinfo: |-
    Query string uses the Lucene syntax.
    For more information about the Lucene syntax, see the link in the help section.
    The query will be used when fetching incidents. Index time field will be used as a filter in the query.
  section: Collect
  required: false
- name: fetch_time_field
  display: Index time field
  type: 0
  section: Collect
  required: false
  additionalinfo: The time field used for sorting and limiting results. If using a nested field, separate field names with dot notation.
- name: raw_query
  display: Raw Query
  type: 12
  additionalinfo: |-
    Raw Query allows raw DSL queries and will override the 'Query String' Lucene syntax string.
    Results will not be filtered or sorted. Use additional parameters in the raw query for these purposes.
    For more information see the link in the help section.
  section: Collect
  advanced: true
  required: false
- name: time_method
  display: Time field type
  defaultvalue: 'Simple-Date'
  type: 15
  options:
  - Simple-Date
  - Timestamp-Seconds
  - Timestamp-Milliseconds
  section: Collect
  advanced: true
  required: false
  additionalinfo: For more information see the explanation in the help section.
- name: map_labels
  defaultvalue: 'true'
  display: Map JSON fields into labels
  type: 8
  section: Collect
  advanced: true
  required: false
- name: fetch_size
  defaultvalue: '5000'
  display: The maximum number of results per fetch
  type: 0
  section: Collect
  required: false
- name: timeout
  display: Request timeout (in seconds).
  type: 0
  defaultvalue: '60'
  section: Connect
  advanced: true
  required: false
- name: isFetchEvents
  display: Fetch events
  type: 8
  section: Collect
  required: false
description: "Search for and analyze data in real time. \n Supports version 6 and later."
display: Elasticsearch Event Collector
name: ElasticsearchEventCollector
script:
  commands:
  - arguments:
    - name: start_time
      description: Start time for fetching events. Supports ISO format ("2023-01-01T23:59:59") or natural language ("2 hours ago", "now").
      required: true
    - name: end_time
      description: End time for fetching events. Supports ISO format ("2023-01-01T23:59:59") or natural language ("2 hours ago", "now").
      required: false
    - name: time_method 
      auto: PREDEFINED
      defaultValue: 'Simple-Date'
      predefined:
      - Simple-Date
      - Timestamp-Seconds
      - Timestamp-Milliseconds
      required: true
      description: For more information see the explanation in the help section.
    - name: fetch_size
      defaultValue: '10'
      description: The maximum number of results per fetch.
      required: false
    - name: fetch_index
      required: false
      description: CSV.
    - name: fetch_time_field      
      required: true
      description: The time field used for sorting and limiting results. If using a nested field, separate field names with dot notation.
    - name: fetch_query
      description: Query string uses the Lucene syntax.
      required: false
    - name: raw_query
      type: 12
      description: Raw Query allows raw DSL queries and will override the 'Query String' Lucene syntax string.
      required: false
    description: This command is used for developing/ debugging and is to be used with caution, as it can cause the API request limit to be exceeded.
    name: es-get-events
  dockerimage: demisto/elasticsearch:1.0.0.10133006
  isfetchevents: true
  runonce: false
  script: '-'
  subtype: python3
  type: python
marketplaces:
- marketplacev2
- platform
fromversion: 8.4.0
tests:
- No tests (auto formatted)
supportedModules:
- xsiam