Deploying Scripts for Active Actions
Installation of Smart EDR scripts for active actions of the job scheduler is performed by the utility add_jobscheduler_action_scripts.py.
The utility is provided in the smart_edr_ko_maker package, located in the bin directory, and automates the process of generating a ready deployment package.
Installation Sequence
Running the add_task_actions.py Utility
- In the
smart_edr_ko_makerbuilder, navigate to thebindirectory - Run the utility
add_jobscheduler_action_scripts.py
python3 add_jobscheduler_action_scripts.py
Installing the Scripts
After executing add_jobscheduler_action_scripts.py, a build directory is created:
smart_edr_jobscheduler_action_scripts.tar.gz- archive containing:- executable script (
run_edr_task.py) - additional files (
taskrunner.py,loggermanager.py) - configuration file (
config.json) Pythondependencies
- executable script (
add_jobscheduler_action_scripts.sh- installation script
Transfer the contents of build to all data and master nodes.
Extract the archive smart_edr_jobscheduler_action_scripts.tar.gz using the following commands:
chmod +x add_jobscheduler_action_scripts.sh
./add_jobscheduler_action_scripts.sh
Execute the commands above on all data and master nodes.
Environment Preparation
For the correct operation of Smart EDR scripts for active actions in job scheduler tasks, the following is required:
- Install Python 3.10+ on all
dataandmasternodes - Make the installed
pythoninterpreter system-wide
Starting from version 5.1, Smart Monitor includes Python 3.12, which meets the requirements for executing active actions.
- Install libraries required for active actions:
cd /app/opensearch/utils/scripts/jobscheduler-action
pip install -r requirements.txt
Perform the above actions on all data and master nodes.
Deployment of Smart EDR scripts for active actions in the job scheduler is complete. Further configuration and creation of tasks with active actions are described in the corresponding article on integration with the job scheduler.