mps-model-server-plugin

Install instructions can be found in the corresponding How-To.

Health checks

The plugin offers a set of health checks via HTTP GET on port 48305 and path /health.

Health checks can be enabled adding query parameters with the health check name and the value true to the request. Some health checks require further information that needs to be provided by query parameters.

Example of combining health check
http(s)://<host>:48305/health?indexer=true&loadModels=true&loadModelsModuleNamespacePrefix=foo.bar (1) (2)
1 indexer=true enables indexer
2 loadModels=true enables loadModels
  • loadModelsModuleNamespacePrefix is a parameter related to loadModels

indexer

The check fails, if the indexer is currently running for one of the opened projects.

This check indicates a healthy system until a project is opened. Combine it with the projects health check to effectively wait for the system to be ready to serve data immediately.

projects

Reports an unhealthy system whenever no project is loaded.

virtualFolders

Reports an unhealthy system when no virtual folders are available. This might also be true in case a project without virtual folders is fully loaded.

loadModels

Returns after trying to eagerly load a set of specified modules. This check can be used to avoid a slow first ModelQl query after launching an MPS instance running this plugin.

This health check has the side effect of loading the model data. It does not just report whether the model data is loaded or not. It always tries to load model data before returning a result.

Multiple loadModelsModuleNamespacePrefix parameters can be provided to specify the modules from which the models should be loaded.

Usage example
http(s)://<host>:48305/health?loadModels=true&loadModelsModuleNamespacePrefix=org.foo&loadModelsModuleNamespacePrefix=org.bar (1) (2) (3)
1 loadModels=true enables loadModels
2 loadModelsModuleNamespacePrefix=org.foo specifies to load all models from modules starting with org.foo
3 loadModelsModuleNamespacePrefix=org.bar specifies to load all models from modules starting with org.bar