Skip to content

anair-it/stanchion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stanchion - IT support console

Pluggable IT support console for tomcat/tcServer applications. Follow few simple steps and get a fully functional IT support UI in your webapp.

Features

  1. Server Info: (Read-only) Display server name, host, port, JVM uptime etc
  2. Health check: (Read-only) Identifies IBM MQ Connection Factories, DataSource(s) and Zookeeper connection in the app, perform a health check and display a color-coded GOOD/BAD status
  3. Server Properties: (Read-only) Display JVM and tomcat properties
  4. App properties: (Read-only) Display environment properties externalized to app.properties file
  5. Database-driven properties: Create, update, delete and view database-driven configuration. Assuming a table called CONFIG_VALUES that has KEY column and VALUE column, add the following spring bean configuration in the classpath: <bean class="org.apache.commons.configuration.DatabaseConfiguration"> <constructor-arg type="javax.sql.DataSource" ref="dataSource" /> <constructor-arg name="table" value="{SCHEMA}.CONFIG_VALUES" /> <constructor-arg name="keyColumn" value="KEY" /> <constructor-arg name="valueColumn" value="VALUE" /></bean>
  6. Manage:
    a. Logging: Add,update,view log levels dynamically. Supports only Log4j 2.
    b. Cache: View in-memory caches, size and ability to clear cache. Works ONLY with Hazelcast
    c. Camel Jms Consumer: Manage camel based JMS Consumers
    d. Spring Jms Consumer: Manage spring based JMS Consumers
  7. Hawtio: Opens Redhat open-source hawtio JMX console. Hawtio also provides visualization and profiling capabilities for camel flows
  8. Spring batch: The home page lists all jobs in your application. Following capabilities are included:
    a. Identify Spring batch jobs in classpath
    b. Start a job
    c. See last 5 executions of a job. The jobs are listed with JOB-STATUS:CREATE-TIME as the header in descending order
    d. See step detail of each execution. You may abandon, pause, restart jobs based on their current state

Prerequisites

  1. Java 8
  2. Tomcat 7.x or Pivotal tcServer 3.x
  3. Maven 3.x
  4. Enable JMX for tomcat/tcServer
  5. This is more geared for environments that use tomcat, log4j2, hazelcast distributed caching and Apache Camel

Getting started

Follow below mandatory steps:

  1. Download this project

  2. Do a mvn clean install on the project

  3. Add maven dependency to your web application pom:

     <dependency>
     	<groupId>org.anair.stanchion</groupId>
     	<artifactId>stanchion-web</artifactId>
     	<version>1.0.0</version>
     	<type>war</type>
     	<scope>runtime</scope>
     </dependency> 
     <dependency>
     	<groupId>org.anair.stanchion</groupId>
     	<artifactId>stanchion-core</artifactId>
     	<version>1.0.0</version>
     	<type>jar</type>
     </dependency> 
    

4.Create application-version.properties file in src/main/resources with content:

name=${pom.name}
version=${pom.version}

5.Filter src/main/resources folder to allow variable replacement for application-version.properties. Add the below resource segment to the pom:

<build>
...
	<resources>
		<resource>
			<directory>src/main/resources</directory>
			<filtering>true</filtering>
		</resource>
	</resources>
...
</build>	

6.By default, the application gets all JMX privileges. Add the jvm arg -Djolokia.policy.type=ro to disable JMX write and execute privileges
7. The support console web components is overlayed into your application
8.Hit url http://{host name}:{port}/{context root}/stanchion/index.jsp and IT support console will be displayed

Health check

  • Monitor health of datasource, MQ and zookeeper connection from the application
    • Hit the url http://{host name}:{port}/{context root}/stanchion/secure/healthcheck and get back a json response with a list of database/mq connections and status
    • Configure monitoring tool to inspect JMX Mbeans to check resource health. Inspect all mbeans in stanchion:type=health-check and check the boolean value of the exposed JMX attribute Healthy

Optional steps

  • If there is a jar conflict with your application or do not need certain jars in the application, add dependency excludes to stanchion-core dependency.

Notes

  • If you do not have Spring batch job in the project, the UI show an info message. This is expected behavior.
  • If you do not have a database-driven configuration setup, you will see an info message in the UI. This is expected behavior.
  • For release notes, refer CHANGELOG.md

About

IT support console for Tomcat web application

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published