Configuring model life-cycle reporting
A message is written to the correlator log file whenever a model is created or deleted, or when it fails. This behavior can be changed by updating the corresponding life-cycle actions of the apama.analyticskit.Configuration event in the Configuration.mon file. By default, this file is located in the /usr/edge/properties/apama/framework/monitors directory, but this may change depending on your configuration.
You can modify the following actions for custom reporting of the model life-cycle:
Action | Description |
onModelStart | This action is called with the model details whenever a model is created. It logs a message by default. |
onModelEnd | This action is called with the model details whenever a model is deleted. It logs a message by default. |
onModelFailure | This action is called with a failure reason whenever a model fails during creation or at runtime. It logs a message by default. |
Some examples of the reporting you can implement are:
Sending life-cycle events to a dashboard to visualize currently running or failed models.
Sending Cumulocity operations to a standard device.
Sending life-cycle events for downstream monitoring and taking action if a model fails unexpectedly.