Configuration Installation
The first stage is designed to automate the deployment and setup of dependent objects for the Smart EDR module. The setup is performed by the make_smart_edr.py utility. The utility is provided in the smart_edr_ko_maker package and located in the bin directory. The utility performs the following tasks:
- Deployment of knowledge objects (
Smart Monitorentities) - Creation of index templates
- Creation of index patterns
- Loading rules from a CSV file
Requirements
- Python 3.12 or higher
- Utility dependencies are installed by the
bin/install_dependencies.shscript, which creates.venvand installs thesmpyandhttpxlibraries - Access to the
Smart Monitorcluster with administrator credentials
Utility Structure
The script contains the following directory structure:
./
├── data/ # Main directory with configurations
│ ├── sm_*/ # Directories with `Smart Monitor` entities (starting with sm_)
│ ├── index_templates/ # Index templates
│ ├── index_patterns/ # Index patterns
└── lookups/
└── rules.csv # CSV file with rules
File Formats
-
Smart Monitorentities (insm_*directories): JSON files with metadata in the_metafield and a unique identifier -
Index templates (
index_templates):{
"name": "template_name",
"index_template": {
// template configuration
}
} -
Index patterns (
index_patterns):{
"attributes": {
"title": "pattern_name"
},
"references": []
} -
Rules (
rules.csv): Current list ofBI.ZONE EDRthreat detection rules
Installation Sequence
1. Install Utility Dependencies
./bin/install_dependencies.sh
The script creates the .venv virtual environment and installs utility dependencies, including the smpy and httpx libraries.
2. Run Configuration Installation
Installation is performed by running the make_smart_edr.py utility:
./.venv/bin/python bin/make_smart_edr.py \
--sm_host <SMART_MONITOR_HOST> \
--sm_api_port <SMART_MONITOR_API_PORT> \
--sm_cluster_port <OPENSEARCH_PORT> \
--sm_user <SMART_MONITOR_USER> \
--sm_password '<SMART_MONITOR_PASSWORD>'
Command-line parameters:
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
--sm_host | Yes | str | - | Smart Monitor host (one of the cluster nodes) |
--sm_api_port | No | int | 5601 | Frontend API port (saved objects) |
--sm_cluster_port | No | int | 9200 | OpenSearch API port (index templates, sm entities, lookups) |
--sm_user | Yes | str | - | Username |
--sm_password | Yes | str | - | User password |
Example run:
./.venv/bin/python bin/make_smart_edr.py --sm_host open-search-host-1.my_company.ru --sm_api_port 5601 --sm_cluster_port 9200 --sm_user admin --sm_password securepassword
--sm_api_port is used for the frontend API and saved objects (index patterns). --sm_cluster_port is used for the OpenSearch API (index templates, sm entities, and lookups).
If the frontend API and OpenSearch are published on different servers, you can explicitly set --sm_api_host and --sm_cluster_host.
3. Checking Configuration Application
-
In the
Templatessection: (Main Menu-System Settings-Index Management-Templates) module templates are displayed:
-
In the
Index Patternssection: (Main Menu-System Settings-Module Settings-OPENSEARCH-Index Patterns) module index patterns are displayed:
-
In the
Lookup List: (Main Menu-Lookup Manager-Lookup List) module lookups are displayed:bizone_alert_settingdim_bizone_hostdim_bizone_ruledim_bizone_tasklink_bizone_alert_severity_incident_severity
-
The
dim_bizone_rulelookup contains a list of threat detection rules
4. Register the Module Incident Type
After importing the Smart EDR content module, run the apply_incident_types.py script from the same smart_edr_ko_maker utility. The script registers incident card fields (investigation playbook), idempotently creates the Security Incident incident type, and then assigns it to the module jobs.
./.venv/bin/python bin/apply_incident_types.py \
--sm_host <SMART_MONITOR_HOST> \
--sm_api_port <SMART_MONITOR_API_PORT> \
--sm_user <SMART_MONITOR_USER> \
--sm_password '<SMART_MONITOR_PASSWORD>'
After execution, verify that:
- the
Security Incidentincident type appears inMain Menu-Incident Manager-Incident Types - the type is available in the
Incident Typedropdown list in the job editor - incident jobs of the
Smart EDRmodule received this type - the incident card displays the playbook fields