Skip to main content
Version: Classic

Health Monitor


The Health Monitor is a standalone service within the primedocs infrastructure that continuously monitors the system state. It periodically checks all configured services and data sources and provides the results both via a dashboard in the DataSourceAdminApp and via an API. The Health Monitor is has to be configured in the primedocs.config (primedocs.config).

General Function

Dashboard

The Health Monitor dashboard is accessible via the DataSource Admin App and provides an overview of the current system status. It shows the status of all PrimeDocs services and data sources and allows the status to be refreshed manually. Detected warning and error messages from the application log can also be marked as read.

The dashboard updates automatically as long as the status is still unknown (e.g. directly after the service has started).

API

The current system status can also be retrieved programmatically. The API can be called without authentication:

GET {HealthMonitorUrl}/v1/status

Return values:

ValueStatusHTTP CodeDescription
0OK200No problems detected. All services are running normally.
1Degraded200Warnings are present. Services may be operating with limited functionality.
2Severely degraded or nonoperational500Errors are present. Services may not be reachable or not functioning.
3Unknown200The status is currently being determined. Typically occurs only when the Health Monitor starts.

For detailed information, another endpoint is available which requires Basic Authentication (credentials are configured in primedocs.config):

GET {HealthMonitorUrl}/v1/status/detailed

Detected Errors and Warnings

The Health Monitor performs various checks on the system and data source level. The checks can be grouped into the following categories:

Configuration

Checks the validity of primedocs.config. This includes:

  • Syntactic and structural correctness of the XML configuration file
  • Valid app types for all configured applications

Possible impact: 🔴 Error

Reachability of Services

Checks whether the configured PrimeDocs services (e.g. Web API, other server applications) are reachable at their configured URLs.

Possible impact: 🔴 Error

Certificates

Checks the validity of the signing certificate configured for the Identity Server.

Possible impact: ⚠️ Warning (expires in < 30 days), 🔴 Error (expires in < 14 days or could not be loaded)

Application Log

Analyzes the NLog database for warnings and errors from the last 24 hours. Using the optional errorRatePolicy in primedocs.config, you can configure from which error rate per hour an error is triggered:

<healthMonitor basicAuth="user:pass" clientSecret="secret" intervalInSeconds="600">
<errorRatePolicy errorsPerHourThreshold="10"
statusBelowThreshold="Warning"
statusAboveThreshold="Error" />
</healthMonitor>

Without a configured policy, entries in the error log are displayed as warnings.

This function must be activated via the attribute databaseLoggingEnabled="true" on the primedocs element in primedocs.config.

Possible impact: ⚠️ Warning, 🔴 Error (depending on configuration)

Data Source Configuration and Content

For each configured data source, additional checks are carried out, e.g. for global settings, themes and content (for example snippets).

Possible impact: ⚠️ Warning, 🔴 Error

Unexpected Errors

If an unhandled exception occurs while executing any check, it is recorded as an error and displayed on the dashboard.

Possible impact: 🔴 Error