If such an error event occurs, the Bridge calls the registered monitoring service, that executes whatever has to be done in this case, for instance sending an email to the system administrator. The monitoring service is also a UML model being executed.
The monitoring service is just another Bridge service that is registered as a monitor to the Bridge. If any service on the Bridge has an error (level Fatal or Error) or even is terminating unexpectedly, the Bridge calls the registered monitoring service. In this service, you are free to model anything you want, all Bridge features are available. The only requirement is that the service provides a specific frontend SOAP interface, corresponding to the Bridge calls.
There is also a standard implementation of a monitoring service available. For more information on features and handling, see Monitoring Service With UI.
Requirements of a Monitoring Service
A service designed to be registered to a Bridge must meet the interface definitions of the following WSDL:
This means that the service must have an operation called monitor with the following input parameters:
|timestamp||DateTime||in||Receives the timestamp of the incident (UTC-Time).|
|host||String||in||Receives the name of the node instance where incident occurred.|
|service||String||in||Receives the composite name of the service that has failed.|
|processID||String||in||Receives the process ID the service has been assigned by the operation system.|
|level||String||in||Receives the error level.|
Should be one of:
|category||String||in||Receives the category of the error.|
Should be one of:
|type||String||in||Receives the error domain.||A user defined or a standard error domain. For more information, refer to Modeling Error Handling.|
|code||String||in||Receives the error code of the error. Together with the domain value, this is the unique identifier of an error.||A list of all built-in error domains/codes can be found on Error Codes pp.|
|description||String||in||Receives the description of the error.||Human readable, see also Modeling Error Handling.|
|detailLocation||String||in||Receives the location of a log file that might have further information about the incident.|
Registering the Monitoring Service
After you have deployed the monitoring service to the Bridge, you need to register it to the Bridge at the node preferences page. For that purpose, you have to define the SOAP URL of the monitoring service. The SOAP URL of the monitoring service can be taken from the element
soap:address location of the WSDL of the monitoring service (usually it is http://<hostname>:<port>/<package name(s)>/<E2ESOAPPortType>).
Figure: Registering the Monitoring Service
Actually, it is even possible that the monitoring service fails. Thus, a fallback monitoring service can optionally be specified in field Monitoring SOAP URL Fallback. This fallback service can even run on another Bridge.
- If you register no monitoring service then nothing happens.
- If you register one monitoring service then this service is called.
- If you register two monitoring services then the first service is called. If the call fails, means the monitor throws an exception by itself or does not respond within three seconds, then the second service is called.