Skip to main content
Version: 5.3

Installing Configurations

The first stage is designed to automate the deployment and configuration of dependent objects for the Smart Code module. Configuration is performed using the make_smart_code.py utility. The utility is provided in the smart_code_ko_maker package and located in the bin directory. The utility performs the following tasks:

  1. Deployment of knowledge objects (Smart Monitor entities)
  2. Creation of index templates
  3. Creation of indexes
  4. Deployment of ISM (Index State Management) policies
  5. Loading interface types from a CSV file

Requirements:

  1. Python 3.x
  2. Installed dependencies: requests, urllib3
  3. Access to the Smart Monitor cluster 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
│ ├── indexes/ # Index configurations
│ └── ism_policies/ # Index state management policies
└── lookups/
└── dim_continent_interface_iftype.csv # CSV file with interface types for "Continent" family equipment

File Formats

warning

Index settings (indexes) and policies (ism_policies) are for demonstration purposes and must be adjusted to meet installation requirements regarding data rotation and replication configuration.

  1. Smart Monitor Entities (in sm_* directories): JSON files with metadata in the _meta field and a unique identifier
  2. Index Templates (index_templates):
    {
    "name": "template_name",
    "index_template": {
    // template configuration
    }
    }
  3. Indexes (indexes):
    {
    "index_name": {
    // index configuration
    }
    }
  4. ISM Policies (ism_policies):
    {
    "policy": {
    "policy_id": "policy_name",
    // remaining configuration
    }
    }
  5. Interface Types (dim_continent_interface_iftype.csv): Current list of interface types for equipment from the Continent family

Installation Sequence

1. Running Configuration Installation

Installation is performed by running the make_smart_code.py:

python make_smart_code.py --sm_host <host> --sm_user <user> --sm_password <password> [--sm_port <port>]

Command line parameters:

ParameterRequiredTypeDefault ValueDescription
--sm_hostYesstr-Smart Monitor host (one of the cluster nodes)
--sm_portNoint9200Smart Monitor port
--sm_userYesstr-Username
--sm_passwordYesstr-User password

Example execution:

python make_smart_code.py --sm_host open-search-host-1.my_company.ru --sm_user admin --sm_password securepassword --sm_port 9200

2. Checking configuration application

  1. In the Templates section: (Navigation Menu - System Settings - Index Management - Templates) the module templates are displayed: Templates interface Templates interface

  2. In the Index patterns section: (Navigation Menu - System Settings - Module Settings - OPENSEARCH - Index patterns) the module index patterns are displayed: Index patterns Index patterns

  3. In the lookup list Lookup list: (Navigation Menu - Lookup Manager - Lookup list) the module lookups are displayed: Lookups interface

  4. The dim_continent_interface_iftype lookup contains a list of interface types of equipment from the Continent family