Anchor | ||||
---|---|---|---|---|
|
System health checks are performed by the Pipeline managers. Health checks check the overall health of the system for things like:
Once configured, the health of the entire server, as well as detailed information on each health check, is available through the admin RESTful interface.
Pipeline managers need to be configured to perform health checks to determine how Aspire is performing.
To configure health checks for your system add a <healthChecks> section to the pipeline managers for which you desire health checks. Details on how to configure each type of health check are given below. Multiple health checks can be configured per pipeline manager.
The following is an example configuration:
Code Block | ||
---|---|---|
| ||
<component name="MyPipelineManager" subType="pipeline" factoryName="aspire-application"> <healthChecks> <timestamp name="Test Timestamp" redThreshold="4000" yellowThreshold="1000" history="5" /> <initialization name="Test Long Initializer"> <check componentRef="/pipeline/LongInitializer"/> <check componentRef="/pipeline/Concat-Test"/> </initialization> <jobCount redThreshold="1" /> </healthChecks> <!-- Configure your pipelines here --> <!-- Configure your components here --> </component> |
Note that all health checks can have a "user friendly name" attached to them (the @name attribute).
Once health checks are configured for your pipeline managers, they will be automatically accumulated and made available as requested.
There are multiple types of health checks available. The types currently available include:
Health Checks can be:
The health checks for all pipeline managers across the system are accumulated into a single health check for the entire server. URLS are also available for accessing and managing health checks:
This health check is used to check components to see if they are initializing. If they are, the health of the system will be returned as "INITIALIZING".
Configuration:
Code Block | ||
---|---|---|
| ||
<initialization name="Test Long Initializer"> <check componentRef="/pipeline/LongInitializer"/> <check componentRef="/pipeline/Concat-Test"/> </initialization> |
Attribute:
Health details:
Note: It is expected that the initialization health check will be performed automatically in a future release of Aspire, at which point this health check will be deprecated.
This health check provides a total count of jobs and will determine the health of the system based on the total number of failed jobs that occur.
Configuration:
Code Block | ||
---|---|---|
| ||
<jobCount name="Count of Document Jobs" redThreshold="3" yellowThreshold="1"/> |
Attributes:
Health details will show:
Timestamp health checks are used to check the duration of every job and are typically used for occasional jobs (for example, nightly) that take a long time to run (i.e., hours).
Configuration:
Code Block | ||
---|---|---|
| ||
<timestamp name="Rebuild Dictionary Token Stats" history="5" redThreshold="10000" yellowThreshold="2000"/> |
Attribute:
History:
A history of old timestamps will be kept and displayed in the health check details.
Note that only the most recent timestamp will contribute to the health of the overall system.
Latency health checks compute a moving average of the time it takes to complete a job and then will flag RED or YELLOW if average job latency rises above specified thresholds.
Averages are computed over a specified number of jobs (@jobsToAverage). This method will also compute a peak average latency and give a history of averages for previous time periods.
Configuration: (defaults to 15 minute intervals over 24 hours)
Code Block | ||
---|---|---|
| ||
<latency name="Process Single Document" jobsToAverage="5" isSticky="true" redThreshold="15000" yellowThreshold="5000" /> |
Configuration: (specify the interval and history length)
Code Block | ||
---|---|---|
| ||
<latency name="Process Single Document" jobsToAverage="5" isSticky="true" redThreshold="15000" yellowThreshold="5000" interval="3600000" history="48" /> |
Attributes for Moving Averages:
Attributes for History Presentation:
Notes:
Anchor | ||||
---|---|---|---|---|
|
To view the debug console for Aspire, go to http://localhost:50505/aspire after starting up the Aspire server.
See Changing the Aspire Port Address for information about changing the port address or General Settings for adding a username and password to the debug console.
Every component configured in Aspire has a web page. The web page can be accessed using the component's full name as: http://server:50505/aspire/{component-full-name} (see Naming Components for more details on component names).
NavigatingThe component manager and pipeline manager components contain links to all of the sub-components they contain. The Aspire application component (the component which reponds to the http://localhost:50505/aspire address) also has links to all of the installed applications.
In this way, you can usually navigate to any component by clicking the links from parent components to sub-components.
Components can also receive commands from the admin user interface. Web commands to individual components have many different purposes:
All component commands have a "cmd" parameter which specifies the name of the command to execute. For example, to get the status of a component use:
http://localhost:50505/aspire?cmd=status
Some commands also take additional URL parameters.
In general, it is not necessary to document the component commands, since they should all be available from the System Administration user interface itself.
The following commands are common to all components in Aspire. The format for each command is:
http://server:50505/aspire/{component-name}?cmd={command}&{parameters}
Command | Parameters | Description |
---|---|---|
status | none | Provides status on the command. This provides the same result as navigating to the command in the user interface. |
log | display | Displays the log file for the specified command. For example, http://localhost:50505/aspire?cmd=log&display will display the log file for the Aspire application component. |
log | debug=true | Turns on debug logging. Debug messages can be viewed with the log/display command. |
log | debug=false | Turns off debug logging. |
-== XML and XSLT ===
All commands executed by the System Administration user interface return straight XML to the web browser. You can test this by doing a "view source" on any page in the interface (using Firefox; if using IE9, use the developer tools to see the original XML).
In order to convert the XML to a user-friendly display, the XML is transformed to XHTML and CSS using an XSLT stylesheet. The style sheet is automatically located by the Aspire application and if it exists, it is added as an <?xml-stylesheet> processing command to the top of the resulting XML returned by the component. The web browser will then fetch the XSLT transform and will transform the XML into XHTML for display.
XSL transforms for the debug console are bundled with the Jar file which contains the component code. This increases the portability of components, since the System Administration user interface (i.e., the XSL transform) is included and installed automatically with the component software itself.
However, the Aspire application will first attempt to load the transform from the following directory:
Code Block |
---|
{Aspire Home}/resources/{component-implementation-class} |
This is done for user interface development, since it is much easier to edit files in the Aspire Home directory than it is to edit files inside a component Jar file.
For example, if the component's Java implementation class is "com.searchtechnologies.aspire.components.RDBConnectionStage", then the Aspire application will first attempt to load the transform from the following directory:
Code Block |
---|
{Aspire Home}/resources/com.searchtechnologies.aspire.components.RDBConnectionStage |
If the XSLT is not in Aspire Home (and it typically is not), then it will then attempt to locate it in the component's Jar file, under the "resources/{component-implementation-class} directory. In this way, most of the components are bundled with the XSL transform used for their administration user interface.
The XSL transform names are the same as the Aspire URL command names, i.e. . That is, the command names passed to the "cmd" parameter on the URL.
For example, "status.xsl" is the XSL transform used for all status reports.
If the XSL file for the specific command can not be located, the XSL transform called "result.xsl" will be located. This is the fallback transform used to present the result for most components.
Finally, if no "result.xsl" transform can be located, the XML will be sent directly to the admin user without a transform.