Manage database indexes
Index collections
Itential Platform requires indexes to be created in MongoDB collections for optimal performance. The following collections require predefined indexes. The owning application is shown in parentheses.
accounts(pronghorn-core)catalog_store(app-service_catalog)forms(app-form_builder)groups(pronghorn-core)iap_profiles(pronghorn-core)integration_models(pronghorn-core)jobs(app-workflow_engine)job_history(app-workflow_engine)mop_templates(app-mop)mop_analytic_templates(app-mop)roles(pronghorn-core)service_configs(pronghorn-core)tags(tags)tasks(app-workflow_engine)transformations(app-jst)ucm_configs(app-configuration_manager)wfe_job_metrics(app-workflow_engine)wfe_task_metrics(app-workflow_engine)workflows(app-workflow_engine)
Indexing APIs and seeding
Indexing in Itential Platform is managed via indexing APIs that can be called while the platform is running — not via indexing scripts. If an application is not installed, indexes for its collections are not required.
Collections that do not already exist are automatically created and properly indexed when Itential Platform starts. For new installations, manual indexing is not required. Use the indexing APIs when additional indexes are needed or an index has been accidentally dropped.
Validate indexes
To verify that a collection is properly indexed, use the GET /indexes/:collectionName/status API. This returns an object containing all missing or incorrectly named indexes. For example, to check the jobs collection:
Any collection that is incorrectly indexed should go through the index creation API.
Create indexes
Create indexes only during a maintenance window, especially for large collections like jobs and tasks. Indexing these collections can take time and may impact MongoDB performance until the process completes.
If a collection is not properly indexed, the POST /indexes/:collectionName API creates any missing indexes and drops then recreates any indexes with an incorrect name. For the jobs collection:
Submit an empty request body. All collections that are already properly indexed, or that are not included in the predefined index set, are ignored. If index creation has already been started, this call will not trigger a second creation in MongoDB. The API initiates the process but does not wait for it to complete before responding, since index creation can take significant time.
Validate indexes after creation
After running the index creation API, validate that indexes were created successfully. For large collections such as jobs and tasks, use GET /indexes/:collectionName/status to monitor progress and confirm when the process is complete.
Legacy npm script validation (deprecated)
The npm script method is deprecated. Use the indexing APIs described above instead.
The following applications support the legacy npm run index script:
- Command Templates/MOP
- Service Catalog
- Workflow Engine
Automation Engine indexes
Run the index script for Workflow Engine:
After the script completes, verify the indexes in MongoDB:
Example output: