Skip to main content
Version: 5.2

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. Verifying Configuration Application

  1. In the Index Policies (Main menu - Settings - Index Management - Index Policies) policies are displayed sns-ism, continent-ism, continent-trash: Index Policies Index Policies
  2. In the Managed Indexes section (Main menu - Settings - Index Management- Managed Indexes), the module indexes managed by the policies from step 1 are displayed::
Index NamePolicy
continent-clients-database-000001continent-ism
continent-info-snmp-000001continent-ism
continent-info-syslog-000001continent-ism
continent-interface-info-snmp-000001continent-ism
continent-interface-ip-snmp-000001continent-ism
continent-interface-stats-snmp-000001continent-ism
continent-ips-syslog-000001continent-ism
continent-multiwan-snmp-000001continent-ism
continent-pair_bond-snmp-000001continent-ism
continent-sd-database-000001continent-ism
continent-sd-snmp-000001continent-ism
continent-sd-syslog-000001continent-ism
continent-trash-syslog-000001continent-trash
sns-mysql-entity_client-000001sns-ism
sns-mysql-secretnetlog-000001sns-ism
sns-mysql-serviceualog-000001sns-ism
sns-syslog-000001sns-ism
  1. In theTemplates section (Main menu - Settings - Index Management - Templates) the module templates are displayed: Templates Templates
  2. In the list of directories Directory List (Main menu - Lookup Manager - Directory List) the module directories are displayed: Directory
  3. The dim_continent_interface_iftype directory contains a list of interface types for equipment from the Continent family