LDSTechForumProjects

Canary Training

This training covers using the stack-system module to configure a Canary page in your Spring Application

Prerequisites

Slide deck

Example code

Section 1


Lab 1

Project setup

  • Download the lab code and import the project into your favorite IDE.
  • Get your application deployed and running in Tomcat.
  • Go to http://localhost: 8080/stack-project/canary
  • Notice that no resources were defined, only "Information". We'll add a resource in the next lab.
  • View the page source to see the XML behind the page.

Section 2

Lab 2

Add a Database Check to Your Canary Page

  • Add a database checker to your canary page. In applicationContext.xml, inside the resource-checks element, add...
 <stack-canary:range-database-check name="Example Row Count" query="select count(*) from example" min="1" />
  • Restart your server and go to http://localhost: 8080/stack-project/canary
  • Notice the check failed - there aren't any rows in the example table.
  • Go to http://localhost: 8080/stack-project/ and add an "Example" record.
  • Go back to the canary page and refresh. Notice the check still fails if the cached response has not yet expired.
  • Notice the timing information in the detail of the resource; wait until the cache has expired and reload the canary page.

Middleware Demo

Shawn did a demo on registering and updating a canary page with Nagios using the ASE Assist Tool. The recording is available on the Middleware Training Wiki. This resource is only available inside the church network as it is only relevant to church projects.

Section 4

This page was last modified on 21 June 2013, at 12:17.

Note: Content found in this wiki may not always reflect official Church information. See Terms of Use.