Pluggable IT support console for tomcat/tcServer applications. Follow few simple steps and get a fully functional IT support UI in your webapp.
- Server Info: (Read-only) Display server name, host, port, JVM uptime etc
- 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
- Server Properties: (Read-only) Display JVM and tomcat properties
- App properties: (Read-only) Display environment properties externalized to app.properties file
- 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>
- 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 - Hawtio: Opens Redhat open-source hawtio JMX console. Hawtio also provides visualization and profiling capabilities for camel flows
- 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
- Java 8
- Tomcat 7.x or Pivotal tcServer 3.x
- Maven 3.x
- Enable JMX for tomcat/tcServer
- This is more geared for environments that use tomcat, log4j2, hazelcast distributed caching and Apache Camel
Follow below mandatory steps:
-
Download this project
-
Do a
mvn clean install
on the project -
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
- 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
- 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.
- 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