Installing and Initializing Inventory
Prerequisites
The following files are required for installation:
- archive with
sm-inventorymodule files for OpenSearch - archive with
smartMonitorInventorymodule files for OpenSearch Dashboards
Installation Process
Install the module on OpenSearch servers with the following command:
sudo -u opensearch $OPENSEARCH_HOME/bin/opensearch-plugin install file://<path to module archive>
Install the module on OpenSearch Dashboards servers with the following command:
sudo -u opensearch $OPENSEARCH_DASHBOARDS_HOME/bin/opensearch-dashboards-plugin install file://<path to module archive>
After installing or updating the plugin, increment build.number in $OPENSEARCH_DASHBOARDS_HOME/package.json. This clears the browser cache. Then restart the OpenSearch Dashboards service.
For details, see Installing Plugins.
Inventory Initialization
To initialize the module, go to Main Menu - Settings - Module Settings - Inventory - Initialization:

Integration with Smart Monitor
Enter the dedicated OpenSearch service account name in the User field.
The Password field cannot be edited. Its value is stored in the OpenSearch keystore.
To integrate the Inventory module with Smart Monitor, store the dedicated OpenSearch service account password in the inv.os.pass keystore key on nodes where the Inventory plugin is installed.
The account is used for license validation and when using the legacy calculation algorithm.
Adding a Password to the Keystore via an API Request
Open Main Menu - Settings - Dev Tools. To identify the nodes where the Inventory plugin is installed, run:
GET _cat/plugins?v&h=name,component,version
In the response, find the rows with sm-inventory in the component column and note the node names from the name column.
To view the keystore contents on the cluster nodes, run:
GET _core/keystore
The nodeid parameter limits the request to the specified nodes. You can use a node name or a wildcard as its value. For details, see Managing the Keystore via API.
Add the key to the nodes with the Inventory plugin by specifying a node name or a common wildcard in the nodeid parameter:
POST _core/keystore/inv.os.pass?nodeid=<INVENTORY_NODE_NAME_OR_MASK>
{
"value" : "<OPENSEARCH_SERVICE_ACCOUNT_PASSWORD>"
}
Specify the dedicated OpenSearch service account password in the value field. If the nodes cannot be selected with a single wildcard, repeat the request for each node where the Inventory plugin is installed.
Adding a Password to the Keystore Manually
Add the inv.os.pass key to the keystore on OpenSearch nodes where the Inventory plugin is installed with the following command:
sudo -u opensearch $OPENSEARCH_HOME/bin/opensearch-keystore add inv.os.pass
When prompted for the key value, enter the dedicated OpenSearch service account password. Restart the OpenSearch node after running the command.
Integration with PostgreSQL
PostgreSQL integration is required for the Inventory module to use the updated calculation algorithm.
The setting is disabled by default, so the fields are optional. When the setting is enabled, all fields are required.
The Password field cannot be edited. Its value is stored in the OpenSearch keystore.
To integrate the Inventory module with PostgreSQL, add the inv.pg.pass key to the keystore only on nodes where the Inventory plugin is installed. Use one of the methods described for the inv.os.pass key: via an API request or manually.
Instead of the dedicated OpenSearch service account password, specify the PostgreSQL user password: in the value field when using an API request or at the command prompt when adding the key manually.
To configure the connection, fill in the following fields:
Host— database server IP addressPort— PostgreSQL connection portDatabase— database nameUser— username for the connection
Node Selection Filtering
By default, tasks run on all servers where the Inventory module is installed. Filters define the set of nodes used to run tasks. This setting is optional.
The following filter types are available:
Include— at least one condition must be metExclude— none of the conditions can be metRequire— all conditions must be met
The following attribute types are available:
Node NameHost IP AddressPublic Host IP AddressIP AddressHost NameNode IdentifierCustom Attribute
In the Value field, enter the node attribute value.
When you use Custom Attribute, a field appears for its name:
Editing Inventory Settings
After initializing the module, you can edit its parameters and add the required settings on the same tab.
Example of a completed form:

Adding a Section to the Main Menu
To add the module component to the menu, go to Main Menu - Settings - Module Settings - Menu Settings - JSON Structure. Add the following JSON object to the data list.
Inventory Menu
{
"itemType": "group",
"name": "inventory",
"show": false,
"id": "39afa001-b528-4488-bd55-58b09c0bded9",
"title": "Inventory",
"sections": [
{
"itemType": "page",
"name": "configs/list",
"show": true,
"id": "f8518eba-cdf9-4341-bd14-51644f09c620",
"title": "Assets",
"enabled": true
}
],
"enabled": true
}
Manual moduleInventory Startup
If necessary, you can start moduleInventory manually, for example, to verify the settings or update the asset database outside the schedule. Run only one module instance on one of the nodes where the Inventory plugin is installed.
Startup Parameters
-v— display the version-log— duplicate log output to the console-with-index— use fast candidate search with partial similarity-bulk-changes— send asset changes using bulk requests
Go to the directory containing the executable and run the command as the opensearch user:
cd $OPENSEARCH_HOME/utils/inventory
sudo -u opensearch ./moduleInventory -log -with-index -bulk-changes
To display the version, run:
sudo -u opensearch $OPENSEARCH_HOME/utils/inventory/moduleInventory -v