Batch Monitoring

You can use the monitoring add-on batch module to inspect execution results of Spring batch jobs, executions and steps.

Dependency

To add this module in you project add the following dependency to your Web application:

<dependency>
    <groupId>org.seedstack.addons.monitoring</groupId>
    <artifactId>monitoring-batch</artifactId>
</dependency>
Show version
dependencies {
    compile("org.seedstack.addons.monitoring:monitoring-batch:3.1.0")
}

This module will provide a REST API to query for batch execution information. You can use the UI provided by this add-on or write your own.

Configuration

The add-on must be configured to access the metadata tables written by your batch jobs. It will uses this information to display batch execution information:

monitoring:
  batch:
    # The JDBC add-on datasource name to use to access batch metadata tables
    datasourceName: (String)
    # The prefix of Spring Batch metadata tables (defaults to BATCH_)
    tablePrefix: (String)

To dump the monitoring.batch configuration options:

mvn -q -Dargs="monitoring.batch" seedstack:config

Security

All batch monitoring REST resources are secured with permissions. These permissions have to be bound to application roles in order to allow access to the user interface. In the configuration file of your web application:

security:
  permissions:
    someApplicationRole: 'seed:monitoring:batch:read' 

Example:

security:
  users:
    jane: 
      password: somePassword
      roles: ADMIN
  roles:
    monitoring: ADMIN
  permissions:
    monitoring: 'seed:monitoring:batch:read' 
   

On this page


Edit this page