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 Monitorentities) - 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.shscript, which creates.venvand installs thesmpyandhttpxlibraries - access to the
Smart Monitorcluster 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 configurationsinv/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>'
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
--sm_host | Yes | string | — | Smart Monitor cluster host |
--sm_api_port | No | int | 5601 | Frontend API port (saved objects, RSM, inventory) |
--sm_cluster_port | No | int | 9200 | OpenSearch API port (index templates, sm entities) |
--sm_user | Yes | string | — | Username |
--sm_password | Yes | string | — | User password |
./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
--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:
-
Index Templates
- in the
Templatessection: (Main Menu-System Settings-Index Management-Templates) 
- in the
-
Index Patterns
- in the
Index Patternssection: (Main Menu-System Settings-Module Settings-OPENSEARCH-Index Patterns) 
- in the
-
Lookups
- in the
Lookup Listsection: (Main Menu-Lookup Manager-Lookup List) - the following lookups must be present:
dim_apm_servicelink_apm_source_service_dest_service
- in the
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 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
APMmodule received this type - the incident card displays the playbook fields