Skip to main content
Version: 6.1

Configuration Installation and Setup

The make_apm.py script is used for automated deployment of infrastructure objects for the APM module. It is included in the apm_ko_maker package and located in the bin directory.

Utility Core Functions

  • deployment of knowledge objects (Smart Monitor entities)
  • creation of index templates
  • creation of index patterns
  • inventory settings

Requirements

  • Python 3.12 or higher
  • utility dependencies are installed by the bin/install_dependencies.sh script, which creates .venv and installs the smpy and httpx libraries
  • access to the Smart Monitor cluster with administrator privileges

Project Structure

./
├── bin/ # Installation and deployment scripts
├── data/ # Configuration files
│ ├── core/ # Resource Service Model (RSM) layers
│ ├── index-patterns/ # Index patterns
│ ├── inv/ # Inventory settings
│ ├── sm_*/ # Smart Monitor entities
│ ├── index_templates/ # Index templates
├── templates/ # RSM metric templates

Configuration File Formats

Smart Monitor Entities (sm_*)

{
"_meta": {
// metadata
},
// configuration
}

Index Templates (index_templates)

{
"name": "template_name",
"index_template": {
// template configuration
}
}

RSM Layers (core/rsm/layers)

{
"title": "layer_name",
"description": "layer_description"
}

Index Patterns (index-patterns)

{
"attributes": {
"title": "pattern_name"
},
"references": []
}

Inventory (inv)

  • inv/inventories — asset configurations
  • inv/relationSettings — relationships between assets

Installation Sequence

Step 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.

Step 2. Run Configuration Installation

./bin/make_apm.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>'
ParameterRequiredTypeDefaultDescription
--sm_hostYesstringSmart Monitor cluster host
--sm_api_portNoint5601Frontend API port (saved objects, RSM, inventory)
--sm_cluster_portNoint9200OpenSearch API port (index templates, sm entities)
--sm_userYesstringUsername
--sm_passwordYesstringUser password
Example
./bin/make_apm.py --sm_host sm-host.my_company.ru --sm_api_port 5601 --sm_cluster_port 9200 --sm_user admin --sm_password securepassword
Attention!

--sm_api_port is used for the frontend API, saved objects, RSM, and inventory. --sm_cluster_port is used for the OpenSearch API (index templates and sm entities). If the frontend API and OpenSearch are published on different servers, you can explicitly set --sm_api_host and --sm_cluster_host.

Step 3. Verify Results in the Interface

After running the utility, verify that the settings have been applied:

  1. Index Templates

    • in the Templates section: (Main Menu - System Settings - Index Management - Templates)
    • apm_index_templates.png
  2. Index Patterns

    • in the Index Patterns section: (Main Menu - System Settings - Module Settings - OPENSEARCH - Index Patterns)
    • apm_index_patterns.png
  3. Lookups

    • in the Lookup List section: (Main Menu - Lookup Manager - Lookup List)
    • the following lookups must be present:
      • dim_apm_service
      • link_apm_source_service_dest_service

Step 4. Register the Module Incident Type

After importing the APM content module, run the apply_incident_types.py script from the same apm_ko_maker utility. The script registers incident card fields (investigation playbook), idempotently creates the IT Incident incident type, and then assigns it to the module jobs.

./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 IT Incident incident type appears in Main Menu - Incident Manager - Incident Types
  • the type is available in the Incident Type dropdown list in the job editor
  • incident jobs of the APM module received this type
  • the incident card displays the playbook fields