Spec-Zone.ru › Ansible

модуль splunk.es.splunk_correlation_searches — модуль ресурса корреляционных поисков Splunk Enterprise Security

Примечание

Этот модуль входит в коллекцию splunk.es (версия 4.0.0).

Возможно, эта коллекция уже установлена, если вы используете пакет ansible. Она не входит в ansible-core. Чтобы проверить, установлена ли она, выполните ansible-galaxy collection list.

Для установки используйте: ansible-galaxy collection install splunk.es.

Чтобы использовать коллекцию в плейбуке, укажите: splunk.es.splunk_correlation_searches.

Добавлено в splunk.es 2.1.0

  • Краткое описание
  • Параметры
  • Примеры
  • Возвращаемые значения

Краткое описание

  • Этот модуль позволяет создавать, удалять и изменять корреляционные поиски Splunk Enterprise Security
  • Модуль протестирован с Splunk Enterprise Server v8.2.3, на котором установлена Splunk Enterprise Security v7.0.1.

Примечание

Этому модулю соответствует плагин действия.

Параметры

Параметр

Комментарии

config

list / elements=dictionary

Настройка мониторинга файлов и каталогов в системе

annotations

dictionary

Добавление контекста из отраслевых стандартных схем кибербезопасности в Splunk Enterprise Security или пользовательских аннотаций

cis20

list / elements=string

Указание аннотаций CIS20

custom

list / elements=dictionary

Указание пользовательской платформы и пользовательских аннотаций

custom_annotations

list / elements=string

Указание аннотаций, связанных с пользовательской платформой

framework

string

Указание платформы аннотаций

kill_chain_phases

list / elements=string

Указание аннотаций Kill 10

mitre_attack

list / elements=string

Указание аннотаций MITRE ATTACK

nist

list / elements=string

Указание аннотаций NIST

app

string

Приложение Splunk, с которым будет связан корреляционный поиск

По умолчанию: "SplunkEnterpriseSecuritySuite"

cron_schedule

string

Введите расписание в формате cron.

Например, '*/5 * * * *' (каждые 5 минут) или '0 21 * * *' (каждый день в 21:00).

Для поисков в реальном времени используется расписание по умолчанию '*/5 * * * *'.

По умолчанию: "*/5 * * * *"

description

string

Описание корреляционного поиска; оно будет отображаться в поле описания веб-консоли

disabled

boolean

Отключение корреляционного поиска

Варианты:

  • false ← (по умолчанию)
  • true

name

string / обязательный

Имя корреляционного поиска

schedule_priority

string

Повышение приоритета планирования отчета. Установите «Higher», чтобы поставить его выше других поисков с тем же режимом планирования, или «Highest», чтобы поставить его выше остальных поисков независимо от режима. Используйте с осторожностью.

Варианты:

  • "default" ← (по умолчанию)
  • "higher"
  • "highest"

schedule_window

string

Разрешение запускать отчет в любое время в пределах окна, начинающегося в запланированное время запуска. Это повышает эффективность при наличии множества отчетов, запланированных на одно время. Параметр «auto» автоматически определяет оптимальную ширину окна для отчета.

По умолчанию: "0"

scheduling

string

Управляет способом, которым планировщик вычисляет время следующего выполнения запланированного поиска.

Подробнее: https://docs.splunk.com/Documentation/Splunk/7.2.3/Report/Configurethepriorityofscheduledreports#Real-time_scheduling_and_continuous_scheduling

Варианты:

  • "realtime" ← (по умолчанию)
  • "continuous"

search

string

Строка поиска SPL

suppress_alerts

boolean

Определяет, следует ли подавлять оповещения этого корреляционного поиска

Варианты:

  • false ← (по умолчанию)
  • true

throttle_fields_to_group_by

list / elements=string

Укажите поля, по которым будут сопоставляться события для ограничения частоты.

throttle_window_duration

string

Время, в течение которого следует игнорировать другие события, совпадающие со значениями полей, указанных в параметре «Группировать по».

time_earliest

string

Самое раннее время с использованием модификаторов относительного времени.

По умолчанию: "-24h"

time_latest

string

Самое позднее время с использованием модификаторов относительного времени.

По умолчанию: "now"

trigger_alert

string

Действия реагирования на значимые события и риски всегда запускаются для каждого результата. Выберите, активировать ли триггер один раз или для каждого результата.

Варианты:

  • "once" ← (по умолчанию)
  • "for each result"

trigger_alert_when

string

Повышение приоритета планирования отчета. Установите «Higher», чтобы поставить его выше других поисков с тем же режимом планирования, или «Highest», чтобы поставить его выше остальных поисков независимо от режима. Используйте с осторожностью.

Варианты:

  • "number of events" ← (по умолчанию)
  • "number of results"
  • "number of hosts"
  • "number of sources"

trigger_alert_when_condition

string

Условие, передаваемое в trigger_alert_when

Варианты:

  • "greater than" ← (по умолчанию)
  • "less than"
  • "equal to"
  • "not equal to"
  • "drops by"
  • "rises by"

trigger_alert_when_value

string

Значение, передаваемое в trigger_alert_when

По умолчанию: "10"

ui_dispatch_context

string

Укажите приложение для ссылок, например для поиска с детализацией в значимом событии или ссылок в действии адаптивного реагирования по электронной почте. Если значение равно None, используется контекст приложения.

running_config

string

По умолчанию модуль подключается к удаленному устройству и получает текущую running-config, чтобы использовать ее как основу для сравнения с содержимым source. Иногда нежелательно, чтобы задача получала текущую running-config для каждой задачи в плейбуке. Аргумент running_config позволяет передать конфигурацию, которая будет использоваться в качестве базовой для сравнения. Это значение должно содержать вывод, полученный с устройства при выполнении команды.

state

string

Состояние, в котором должна остаться конфигурация

Варианты:

  • "merged" ← (по умолчанию)
  • "replaced"
  • "deleted"
  • "gathered"

Примеры

# Using gathered
# --------------

- name: Gather correlation searches config
  splunk.es.splunk_correlation_searches:
    config:
      - name: Ansible Test
      - name: Ansible Test 2
    state: gathered

# RUN output:
# -----------

# "gathered": [
#     {
#       "annotations": {
#           "cis20": [
#               "test1"
#           ],
#           "custom": [
#               {
#                   "custom_annotations": [
#                       "test5"
#                   ],
#                   "framework": "test_framework"
#               }
#           ],
#           "kill_chain_phases": [
#               "test3"
#           ],
#           "mitre_attack": [
#               "test2"
#           ],
#           "nist": [
#               "test4"
#           ]
#       },
#       "app": "DA-ESS-EndpointProtection",
#       "cron_schedule": "*/5 * * * *",
#       "description": "test description",
#       "disabled": false,
#       "name": "Ansible Test",
#       "schedule_priority": "default",
#       "schedule_window": "0",
#       "scheduling": "realtime",
#       "search": '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
#                 'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
#                 'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
#                 'n.src" as "src" | where "count">=6',
#       "suppress_alerts": false,
#       "throttle_fields_to_group_by": [
#           "test_field1"
#       ],
#       "throttle_window_duration": "5s",
#       "time_earliest": "-24h",
#       "time_latest": "now",
#       "trigger_alert": "once",
#       "trigger_alert_when": "number of events",
#       "trigger_alert_when_condition": "greater than",
#       "trigger_alert_when_value": "10",
#       "ui_dispatch_context": "SplunkEnterpriseSecuritySuite"
#     }
# ]

# Using merged
# ------------

- name: Merge and create new correlation searches configuration
  splunk.es.splunk_correlation_searches:
    config:
      - name: Ansible Test
        disabled: false
        description: test description
        app: DA-ESS-EndpointProtection
        annotations:
          cis20:
            - test1
          mitre_attack:
            - test2
          kill_chain_phases:
            - test3
          nist:
            - test4
          custom:
            - framework: test_framework
              custom_annotations:
                - test5
        ui_dispatch_context: SplunkEnterpriseSecuritySuite
        time_earliest: -24h
        time_latest: now
        cron_schedule: "*/5 * * * *"
        scheduling: realtime
        schedule_window: "0"
        schedule_priority: default
        trigger_alert: once
        trigger_alert_when: number of events
        trigger_alert_when_condition: greater than
        trigger_alert_when_value: "10"
        throttle_window_duration: 5s
        throttle_fields_to_group_by:
          - test_field1
        suppress_alerts: false
        search: >
                '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
                'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
                'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
                'n.src" as "src" | where "count">=6'
    state: merged

# RUN output:
# -----------

# "after": [
#     {
#       "annotations": {
#           "cis20": [
#               "test1"
#           ],
#           "custom": [
#               {
#                   "custom_annotations": [
#                       "test5"
#                   ],
#                   "framework": "test_framework"
#               }
#           ],
#           "kill_chain_phases": [
#               "test3"
#           ],
#           "mitre_attack": [
#               "test2"
#           ],
#           "nist": [
#               "test4"
#           ]
#       },
#       "app": "DA-ESS-EndpointProtection",
#       "cron_schedule": "*/5 * * * *",
#       "description": "test description",
#       "disabled": false,
#       "name": "Ansible Test",
#       "schedule_priority": "default",
#       "schedule_window": "0",
#       "scheduling": "realtime",
#       "search": '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
#                 'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
#                 'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
#                 'n.src" as "src" | where "count">=6',
#       "suppress_alerts": false,
#       "throttle_fields_to_group_by": [
#           "test_field1"
#       ],
#       "throttle_window_duration": "5s",
#       "time_earliest": "-24h",
#       "time_latest": "now",
#       "trigger_alert": "once",
#       "trigger_alert_when": "number of events",
#       "trigger_alert_when_condition": "greater than",
#       "trigger_alert_when_value": "10",
#       "ui_dispatch_context": "SplunkEnterpriseSecuritySuite"
#     },
# ],
# "before": [],

# Using replaced
# --------------

- name: Replace existing correlation searches configuration
  splunk.es.splunk_correlation_searches:
    state: replaced
    config:
      - name: Ansible Test
        disabled: false
        description: test description
        app: SplunkEnterpriseSecuritySuite
        annotations:
          cis20:
            - test1
            - test2
          mitre_attack:
            - test3
            - test4
          kill_chain_phases:
            - test5
            - test6
          nist:
            - test7
            - test8
          custom:
            - framework: test_framework2
              custom_annotations:
                - test9
                - test10
        ui_dispatch_context: SplunkEnterpriseSecuritySuite
        time_earliest: -24h
        time_latest: now
        cron_schedule: "*/5 * * * *"
        scheduling: continuous
        schedule_window: auto
        schedule_priority: default
        trigger_alert: once
        trigger_alert_when: number of events
        trigger_alert_when_condition: greater than
        trigger_alert_when_value: 10
        throttle_window_duration: 5s
        throttle_fields_to_group_by:
          - test_field1
          - test_field2
        suppress_alerts: true
        search: >
                '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
                'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
                'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
                'n.src" as "src" | where "count">=6'

# RUN output:
# -----------

# "after": [
#     {
#         "annotations": {
#             "cis20": [
#                 "test1",
#                 "test2"
#             ],
#             "custom": [
#                 {
#                     "custom_annotations": [
#                         "test9",
#                         "test10"
#                     ],
#                     "framework": "test_framework2"
#                 }
#             ],
#             "kill_chain_phases": [
#                 "test5",
#                 "test6"
#             ],
#             "mitre_attack": [
#                 "test3",
#                 "test4"
#             ],
#             "nist": [
#                 "test7",
#                 "test8"
#             ]
#         },
#         "app": "SplunkEnterpriseSecuritySuite",
#         "cron_schedule": "*/5 * * * *",
#         "description": "test description",
#         "disabled": false,
#         "name": "Ansible Test",
#         "schedule_priority": "default",
#         "schedule_window": "auto",
#         "scheduling": "continuous",
#         "search": '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
#                   'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
#                   'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
#                   'n.src" as "src" | where "count">=6',
#         "suppress_alerts": true,
#         "throttle_fields_to_group_by": [
#             "test_field1",
#             "test_field2"
#         ],
#         "throttle_window_duration": "5s",
#         "time_earliest": "-24h",
#         "time_latest": "now",
#         "trigger_alert": "once",
#         "trigger_alert_when": "number of events",
#         "trigger_alert_when_condition": "greater than",
#         "trigger_alert_when_value": "10",
#         "ui_dispatch_context": "SplunkEnterpriseSecuritySuite"
#     }
# ],
# "before": [
#     {
#         "annotations": {
#             "cis20": [
#                 "test1"
#             ],
#             "custom": [
#                 {
#                     "custom_annotations": [
#                         "test5"
#                     ],
#                     "framework": "test_framework"
#                 }
#             ],
#             "kill_chain_phases": [
#                 "test3"
#             ],
#             "mitre_attack": [
#                 "test2"
#             ],
#             "nist": [
#                 "test4"
#             ]
#         },
#         "app": "DA-ESS-EndpointProtection",
#         "cron_schedule": "*/5 * * * *",
#         "description": "test description",
#         "disabled": false,
#         "name": "Ansible Test",
#         "schedule_priority": "default",
#         "schedule_window": "0",
#         "scheduling": "realtime",
#         "search": '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
#                   'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
#                   'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
#                   'n.src" as "src" | where "count">=6',
#         "suppress_alerts": false,
#         "throttle_fields_to_group_by": [
#             "test_field1"
#         ],
#         "throttle_window_duration": "5s",
#         "time_earliest": "-24h",
#         "time_latest": "now",
#         "trigger_alert": "once",
#         "trigger_alert_when": "number of events",
#         "trigger_alert_when_condition": "greater than",
#         "trigger_alert_when_value": "10",
#         "ui_dispatch_context": "SplunkEnterpriseSecuritySuite"
#     }
# ]

# Using deleted
# -------------

- name: Example to delete the corelation search
  splunk.es.splunk_correlation_searches:
    config:
      - name: Ansible Test
    state: deleted

# RUN output:
# -----------

# "after": [],
# "before": [
#     {
#       "annotations": {
#           "cis20": [
#               "test1"
#           ],
#           "custom": [
#               {
#                   "custom_annotations": [
#                       "test5"
#                   ],
#                   "framework": "test_framework"
#               }
#           ],
#           "kill_chain_phases": [
#               "test3"
#           ],
#           "mitre_attack": [
#               "test2"
#           ],
#           "nist": [
#               "test4"
#           ]
#       },
#       "app": "DA-ESS-EndpointProtection",
#       "cron_schedule": "*/5 * * * *",
#       "description": "test description",
#       "disabled": false,
#       "name": "Ansible Test",
#       "schedule_priority": "default",
#       "schedule_window": "0",
#       "scheduling": "realtime",
#       "search": '| tstats summariesonly=true values("Authentication.tag") as "tag",dc("Authentication.user") as "user_count",dc("Authent'
#                 'ication.dest") as "dest_count",count from datamodel="Authentication"."Authentication" where nodename="Authentication.Fai'
#                 'led_Authentication" by "Authentication.app","Authentication.src" | rename "Authentication.app" as "app","Authenticatio'
#                 'n.src" as "src" | where "count">=6',
#       "suppress_alerts": false,
#       "throttle_fields_to_group_by": [
#           "test_field1"
#       ],
#       "throttle_window_duration": "5s",
#       "time_earliest": "-24h",
#       "time_latest": "now",
#       "trigger_alert": "once",
#       "trigger_alert_when": "number of events",
#       "trigger_alert_when_condition": "greater than",
#       "trigger_alert_when_value": "10",
#       "ui_dispatch_context": "SplunkEnterpriseSecuritySuite"
#     },
# ],

Возвращаемые значения

Общие возвращаемые значения описаны здесь. Ниже перечислены поля, уникальные для этого модуля:

Ключ

Описание

after

list / elements=string

Конфигурация в виде структурированных данных после завершения работы модуля.

Возвращается: при изменении

Пример: ["The configuration returned will always be in the same format of the parameters above."]

before

list / elements=string

Конфигурация в виде структурированных данных до вызова модуля.

Возвращается: всегда

Пример: ["The configuration returned will always be in the same format of the parameters above."]

gathered

dictionary

Сведения о сетевом ресурсе, полученные с удаленного устройства в виде структурированных данных.

Возвращается: если state имеет значение gathered

Пример: "This output will always be in the same format as the module argspec.\n"

Авторы

  • Команда автоматизации безопасности Ansible (@pranav-bhatt) <https://github.com/ansible-security>

Ссылки на коллекцию

  • Отслеживание проблем
  • Репозиторий (исходный код)

© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/projects/ansible/latest/collections/splunk/es/splunk_correlation_searches_module.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API