grails-actuator-ui icon indicating copy to clipboard operation
grails-actuator-ui copied to clipboard

UI representation of Spring Boot Actuator in a Grails 3 app

= Actuator UI Plugin

image:https://travis-ci.org/dmahapatro/grails-actuator-ui.svg?branch=master["Build Status", link="https://travis-ci.org/dmahapatro/grails-actuator-ui"] image:https://api.bintray.com/packages/dmahapatro/plugins/actuator-ui/images/download.svg[link="https://bintray.com/dmahapatro/plugins/actuator-ui/_latestVersion"]

http://docs.spring.io/autorepo/docs/spring-boot/current/reference/htmlsingle/#production-ready[Spring Actuator] is a tool which monitors application's health, metrics and lots of other metadata information about the application. This plugin projects those information in a UI which makes it very user friendly to know the status of the application.

== Demo https://www.youtube.com/watch?v=huhC1LV5I8Q[DEMO]

== Prerequisites

  • For Grails 3.0.* version 0.2 can be used
  • For Grails 3.1.* version 1.0 should be used

== Configuration build.gradle

repositories {
    maven {
        url  "http://dl.bintray.com/dmahapatro/plugins"
    }
}

dependencies {
    ...
    compile "org.grails.plugins:actuator-ui:1.1"
}

== How To To access the actuator endpoints you can simply hit /actuator/dashboard at root context.

http://localhost:8080/sample/actuator/dashboard

where /sample is the root context of the application. For a base Grails app where root context is /, the url will be

http://localhost:8080/actuator/dashboard

== Secured Actuator UI is targeted for Admins and normal users. Taking ROLE into consideration this plugin can be easily integrated with spring security core plugin. For example with a mapping like the below in application.yml would secure /actuator/dashboard endpoint.

grails:
    plugin:
        springsecurity:
            userLookup:
                userDomainClassName: auth.User
                authorityJoinClassName: auth.UserRole
            authority:
                className: auth.Role
            controllerAnnotations:
                staticRules:
                    - pattern: '/actuatordashboard/**'
                      access: ['hasRole("ROLE_ADMIN")']
                    - pattern: '/actuator/**'
                      access: ['hasRole("ROLE_ADMIN")']

=== Avatar support Actuator-ui ships with Gravatar plugin. It will render a gravatar image under the following circumstances:

  • Spring Security is installed
  • The user is logged in

Gravatar is enabled for actuator-ui by default. To disable Gravatar in actuator-ui, you should add the following to application's application.yml.

grails:
    plugin:
        actuator:
            gravatar:
                disabled: true

To modify the default rating and gravatar fallback image please refer to the https://github.com/rpalcolea/grails-gravatar[Gravatar Plugin Documentation]

NOTE: When spring security and gravatar are enabled, the plugin grabs the username to look for the gravatar. In this case the username should be a valid email registered in Gravatar otherwise it will fallback to the default gravatar image.

=== Sample Sample apps with Spring Security Core integration:

  • Run https://github.com/dmahapatro/grails-actuator-ui/tree/master/actuator-ui-app[actuator-ui-app] available as sub project in this plugin repository.
  • Run https://bitbucket.org/bgoetzmann/odelia-gina-actuator/overview[sample app] created by Bertrand Goetzmann.

=== v1.1

  • Gravatar support added for logged in user.

=== v1.0

  • Grails upgraded to v3.1.10

=== v0.2

  • Integrated console plugin. A link is provided in the header bar to open console via console plugin. Appropriate version of console plugin has to be installed in the app which uses this plugin. If console plugin is added as a dependency then actuator dashboard should show console link next to the logged in user in top right corner.
  • Items are searchable now. Search for a particular bean, mapping, calls etc.
  • Paginated list of items.

== TODO

  • Add charts on Garbage Collection metrics.
  • Add support for custom address and port.