Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable app health checks #493

Merged
merged 2 commits into from
Dec 17, 2019
Merged

Enable app health checks #493

merged 2 commits into from
Dec 17, 2019

Conversation

ZakarFin
Copy link
Member

  • Adds a AppStatus concept as OskariComponent. These can be used to add custom checks on an application to detect if it's working properly or not.
  • One example is provided where you can define a file reference in oskari-ext.properties like disablefile.path=/var/run/oskari-disable. If the file exists the status indicator will show that the app should be considered to be in a non-healthy state. This can be used to trigger a request routing policy on a front-server/proxy to route requests to another node in the cluster from now on.
  • Adds a new controller for paths /health and /status to Oskari. Health returns either OK or DISABLED based on HIGH-severity status indicators returning OK or not. Status can be used for building a dashboard to show the application status and it only returns meaningful content for admin-users. For example thematic maps might have a status of partially working if there's problems connecting to some datasource but not all of them.

To add more status indicators you can add a class in the classpath extending OskariComponent and annotating it with Oskari (see ForceDisableByFile.java). Note that the Maven module where you add the status class needs to have the annotation processor enabled (META-INF/services/javax.annotation.processing.Processor in this PR).

@ZakarFin ZakarFin added this to the 1.55.0 milestone Dec 17, 2019
@ZakarFin ZakarFin merged commit d862026 into oskariorg:develop Dec 17, 2019
@ZakarFin ZakarFin deleted the app-health branch December 17, 2019 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant