Skip to main content
Version: 5.0

Installing Inventory

Prerequisites

The following files are required for installation:

  • Archive with saf-inventory module files for OpenSearch
  • Archive with safInventory module files for OpenSearch Dashboards

Installation Process

Installation on OpenSearch servers is performed using the following command:

sudo -u opensearch $OS_HOME/bin/opensearch-plugin install file://<path to module archive>

Installation on OpenSearch Dashboards servers is performed using the following command:

sudo -u opensearch $OSD_HOME/bin/opensearch-dashboards-plugin install file://<path to module archive>

Inventory Initialization

To initialize the module, go to Main menu - System Settings - Module Configuration - Inventory - Initialization:

Inventory Initialization

Integration with SAF

In the User field, enter the OpenSearch account name.

warning

The Password field is non-editable and is managed via the OpenSearch keystore.

To integrate the Inventory module with SAF, add the inv.os.pass key to the password storage of the SA Data Storage and SA Master Node.

Adding a Password to the Keystore via API Request

Open Main menu - System Settings - Developer Console and execute the following query:

GET _core/keystore
info

The API allows modifying the keystore only for specific cluster nodes (e.g., filtered by node name mask). For details on keystore management API, refer to the dedicated article.

The output will display the contents of keystores across all cluster nodes. To add a key to all nodes, edit and execute this request:

POST _core/keystore/inv.os.pass
{
"value" : "<PASSWORD_USER>"
}

Adding a Password to the Keystore Manually

On OpenSearch nodes with the Inventory plugin installed, add the key inv.os.pass to the keystore using this command:

sudo -u opensearch $OS_HOME/bin/opensearch-keystore add inv.os.pass

When prompted, enter the password for the admin user. Restart the OpenSearch node after executing the command.

Integration with Postgres

Integration with PostgreSQL is required for the proper operation of the Inventory module in accordance with the updated calculation algorithm.

By default, the parameter is disabled—in this case, the fields are not mandatory. When the parameter is enabled, all fields become required for input

warning

The Password parameter is non-editable and managed via the OpenSearch keystore.

For the Inventory module to integrate with PostgreSQL, the inv.pg.pass key must be added to the password storage of both SA Data Storage and SA Master Node.

Adding a Password to the Keystore via Request

Open Main Menu - System Settings - Developer Console and execute the following query:

GET _core/keystore
info

The API allows modifying the keystore only for specific cluster nodes (e.g., filtered by node name). For details on the keystore management API, refer to the dedicated documentation article.

The output will display the contents of keystores across all cluster nodes. To add the key to all nodes, modify and execute this request:

POST _core/keystore/inv.pg.pass
{
"value" : "<PASSWORD_USER>"
}

Manual Keystore Password Addition

For OpenSearch nodes with the Inventory plugin installed, manually add the inv.pg.pass key to the keystore using the command:

sudo -u opensearch $OS_HOME/bin/opensearch-keystore add inv.pg.pass

The script will prompt for the key value—enter the PostgreSQL user password. After execution, restart the OpenSearch node.

To configure the connection, fill in the following form fields:

  • Host — the database server's IP address

  • Port — the port for connecting to PostgreSQL

  • Database — the name of the database to use

  • User — the username for connecting

Node Execution Filtering

By default, tasks will be executed on all servers where the Inventory module is installed. Filters allow you to control the set of nodes used for task execution. This parameter is optional.

The following filter types are available:

  • Include – at least one condition must be met
  • Exclude – none of the conditions must be met
  • Require – all conditions must be met

The following attribute types are available:

  • Node Name
  • Host IP Address
  • Public Host IP Address
  • IP Address
  • Host Name
  • Node Identifier
  • Custom Attribute

The node parameter is entered in the Value field.

note

When using a custom attribute, an additional input field will appear for entering its name:

Custom Attribute

Editing Inventory Settings

After initializing the module, you can edit its parameters and add additional settings on the same tab.

Example of a completed form:

Inventory Settings

Adding a Section to the Main Menu

To add the module component to the menu, navigate to Main Menu - System Settings - Management - Navigation - JSON. Add the JSON dictionary below to the data list.

Inventory Menu
{
"itemType": "module",
"name": "inventory",
"show": false,
"id": "39afa001-b528-4488-bd55-58b09c0bded9",
"title": "Inventory",
"sections": [
{
"itemType": "page",
"name": "inventory-configs",
"show": true,
"id": "f8518eba-cdf9-4341-bd14-51644f09c620",
"title": "Assets",
"enabled": true
}
],
"enabled": true
}