Commit Graph

95 Commits

Author SHA1 Message Date
Spring Operator
7c314122f7 Update build and setup configuration to use HTTPS
See gh-16243
2019-03-19 16:01:05 +00:00
Spring Buildmaster
5f959b074f Next Development Version 2016-09-20 20:20:06 +00:00
Spring Buildmaster
a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Spring Buildmaster
2216369348 Next Development Version 2016-07-04 14:15:02 +00:00
Spring Buildmaster
819a9574a6 Next Development Version 2016-05-10 05:28:34 +00:00
Spring Buildmaster
376bbe68d8 Next Development Version 2016-05-06 11:23:57 +00:00
Spring Buildmaster
225d877ab9 Next Development Version 2016-02-26 01:06:16 -08:00
Spring Buildmaster
504d3e97ba Next development version 2016-01-21 18:41:30 -08:00
Spring Buildmaster
8db59059a5 Next Development Version 2015-12-18 05:43:02 -08:00
Spring Buildmaster
3f6f57a80e Next Development Version 2015-11-16 03:18:54 -08:00
Phillip Webb
5e58645202 Log warning for template folder not found problems
Update template auto-configurations to log a warning message rather
than throw an exception if the template folder cannot be found.

Fixes gh-4075
2015-10-02 15:37:39 -07:00
Andy Wilkinson
ff5e4631e3 Add MockMvc-based integration tests for management.security.enabled
See gh-3997
2015-09-30 10:19:04 +01:00
Julien Dubois
c401330901 Add Cassandra support
Add auto-configuration support and health checks for Cassandra and
Spring Data Cassandra.

Fixes gh-2064
Closes gh-2214
2015-09-25 23:00:53 -07:00
Andy Wilkinson
c55900b433 Simplify Jackson-related auto-configuration for HATEOAS and Data REST
This commit simplifies the Jackson-related auto-configuration that’s
applied when Spring HATEOAS and Spring Data REST are on the classpath.

Previously, Boot used Jackson2HalModule to apply the HAL-related
ObjectMapper configuration to the context’s primary ObjectMapper. This
was to allow HAL-formatted responses to be sent for requests accepted
application/json (see gh-2147). This had the unwanted side-effect of
polluting the primary ObjectMapper with HAL-specific functionality.
Furthermore, Jackson2HalModule is an internal of Spring HATEOAS that
@olivergierke has asked us to avoid using.

This commit replaces the use of Jackson2HalModule with a new approach.
Now, the message converters of any RequestMappingHandlerAdapter beans
are examined and any TypeConstrainedMappingJackson2HttpMessageConverter
instances are modified to support application/json in addition to their
default support for application/hal+json. This behaviour can be disabled
by setting spring.hateoas.use-hal-as-default-json-media-type to false.
This property is named after Spring Data REST’s configuration option
which has the same effect when using Spring Data REST. The new property
replaces the old spring.hateoas.apply-to-primary-object-mapper property.

Previously, when Spring Data REST was on the classpath,
JacksonAutoConfiguration would be switched off resulting in the context
containing multiple ObjectMappers, none of which was primary.

This commit configures RepositoryRestMvcAutoConfiguration to run after
JacksonAutoConfiguration. This gives the latter a chance to create its
primary ObjectMapper before the former adds its ObjectMapper beans to
the context.

Previously, the actuator’s hypermedia support assumed that the
HttpMessageConverters bean would contain every HttpMessageConverter
being used by Spring MVC. When Spring HATEOAS is on the classpath this
isn’t the case as it post-processes RequestMappingHandlerAdapter beans
and adds a TypeConstrainedMappingJackson2HttpMessageConverter to them.
This wasn’t a problem in the past as the primary ObjectMapper, used by a
vanilla MappingJackson2HttpMessageConverter, was configured with Spring
HATEOAS’sJackson2HalModule. Now that this pollution has been tidied up
the assumption described above no longer holds true. MvcEndpointAdvice,
which adds links to the actuator’s json responses, has been updated
to look at the HttpMessageConverters of every
RequestMappingHandlerAdapter when it’s trying to find a converter to
use to write a response with additional hypermedia links.

Integration tests have been added to spring-boot-actuator to ensure
that the changes described above have not regressed the ability to
configure its json output using spring.jackson.* properties (see
gh-1729).

Closes gh-3891
2015-09-24 20:44:10 +01:00
Phillip Webb
4aa2fed48b Revert "configure JRE that is different from compiler target level"
This reverts commit 678f36cfef.
2015-09-02 23:44:27 -07:00
Martin Lippert
678f36cfef configure JRE that is different from compiler target level 2015-08-19 17:00:38 +01:00
Dave Syer
de95012635 Workaround problems with order of endpoint handler mapping
When Spring Data REST is owning the home page it has its own
HandlerMapping with a fix (relatively) low priority. The /links
endpoint wants to own the home page as well, and our handler mapping
has a high priority for good reasons. This change addresses the
issue by checking if Spring Data REST is configured and if
the management context path (or  more specifically, the links
endpoint) is the same as the home page.

Fixes gh-3486
2015-07-15 11:45:25 +01:00
Eddú Meléndez
3995c16ba6 Add 'flyway' and 'liquibase' actuator endpoints
Add `/flyway` and `/liquibase` actuator endpoints to provide details of
any database migrations that have been applied.

Fixes gh-3434
Closes gh-3435
2015-07-07 18:58:18 -07:00
Dave Syer
74e9e0749b Add support for Spring HATEOAS hypermedia in Actuator endpoints
If spring-hateoas is on the classpath and an MvcEndpoint returns a
@ResponseBody it will be extended and wrapped into a Resource with links.
All the existing endpoints that return sensible JSON data can be extended
this way (i.e. not /logfile). The HAL browser will also be added as an
endpoint if available on the classpath. Finally, asciidocs for the
Actuator endpoints are available as a separate jar file, which if
included in an app will also generate a new (HTTP) endpoint.

Fixes gh-1390
2015-07-02 13:26:02 +01:00
Stephane Nicoll
18d7634947 Add basic cache metrics support for Infinispan
Closes gh-3066
2015-06-01 17:41:59 +02:00
Dave Syer
20cea2aefc Remove duplicate declaration of s-i-core 2015-05-18 16:01:47 +01:00
Dave Syer
5ceb35473d Allow multiple readers/writers to be @ActuatorMetric*
In principle you might have multiple "system" repositories, all
of which you want to go to public metrics or not be metrics exporters.
This change adds a new annotation and renames the old one, so that
reades and writers can be distinguished, and also changes the
autowiring of them to accept multiple values.

Also adds automatic public metrics for Spring Integration.
2015-05-18 15:01:53 +01:00
Dave Syer
64af3272a1 Extract metric export into a separate autoconfig class
This avoids a potential problems with ordering between Dropwizard and
normal repository configuration. A Dropwizard sample has been added to
verify the behaviour.
2015-05-13 13:56:03 +01:00
Dave Syer
0bd845d183 Add support for Statsd metric export 2015-05-13 13:56:02 +01:00
Dave Syer
53a61474aa Add counter and gauge services based on in-memory buffers
This seems pretty efficient (approx 12M write/s as opposed to 2M with
the DefaultCounterService). N.B. there is no need to change most of
the rest of the metrics stuff because metrics are write-often, read-
seldom, so we don't need high performance reads as much.

The Spring Integration configuration and Dropwizard support has changed
a bit. Functionally very similar and probably opaque to users, but now
the messaging operates as an Exporter on a @Scheduled method, and
Dropwizard is a replacement [Gauge,Counter]Service.

Metrics are all
collected live in-memory (and can be very fast with Java 8), buffered
there and shipped out to a MessageChannel (if one exists with id
"metricsChannel") in a background thread.

We can still use Java 8 library APIs (like LongAdder) but to compile
to java 7 compatible byte code we have to forgo the use of lambdas :-(
and shorthand generics (<>).

Fixes gh-2682, fixes gh-2513 (for Java 8 and Dropwizard users).
2015-05-13 13:56:01 +01:00
Stephane Nicoll
bbbb34a690 Expose cache statistics as metrics
Add an abstraction that provides a standard manner to retrieve a
statistics snapshot of a cache.

Specific implementations for JSR-107, ehcache, hazelcast, guava and
concurrent map are provided. At the moment the size of the cache and
the hit/miss ratios are recorded. Cache metrics are exposed via the
`cache.` prefix followed by the name of the cache. In case of conflict,
the name of the cache manager is added as a qualifier.

It is possible to easily register a new CacheStatisticsProvider for an
unsupported cache system and the CacheStatistics object itself can be
extended to provide additional metrics.

See gh-2633
Closes gh-2770
2015-04-14 15:43:18 +01:00
Andy Wilkinson
03b109a2c8 Polish Elasticsearch health indicator
- Nest the configuration class in HealthIndicatorAutoConfiguration,
   bringing it into line with the other health indicator configuration
   classes
 - Include the statistics from the response in the health’s details
 - Map YELLOW to UP rather than UNKNOWN as it indicates that the cluster
   is running but that “the primary shard is allocated but replicas are
   not” [1]. The details can be used to determine the precise state of
   the cluster.
 - Add a property to configure the time that the health indicator will
   wait to receive a response from the cluster
 - Document the configuration properties
 - Update the tests to cover the updated functionality

See gh-2399

[1] http://www.elastic.co/guide/en/elasticsearch/reference/1.x/cluster-health.html
2015-04-09 10:16:32 +01:00
Binwei Yang
58c8c2ccdc Add a health indicator for an Elasticsearch cluster
Closes gh-2399
2015-04-08 17:18:40 +01:00
Phillip Webb
718a090b32 Restore Java 6 source/target settings
Update spring-boot-actuator to restore Java 6 compatibility.
2015-04-06 20:30:37 -07:00
Phillip Webb
8143d1f36d Apply animal sniffer to entire build
Move animal sniffer configuration out of spring-boot-dependencies to
spring-boot-parent and apply it to all projects.

See gh-716
2015-04-06 19:47:22 -07:00
Dave Syer
c9c1e8b517 Add animal sniffer for Java 6 and jdk1.8 to actuator
The build now requires java 8 (although no language features are yet
in use). Bamboo has been updated.

Fixes gh-716
2015-04-06 08:54:43 +01:00
Stephane Nicoll
bfee98e1f3 Add JMS health indicator
Define an additional health indicator for each ConnectionFactory instance
defined in the context. Extracts the provider name from the connection
meta-data.

Fixes gh-2016
2015-03-10 13:38:19 +01:00
Johannes Stelzer
cd8c3d7327 Add mail health check
Define an additional health indicator for each JavaMailSenderImpl
instance in the context.

Closes gh-2017 and gh-2617
2015-03-10 10:17:33 +01:00
Phillip Webb
a57a88f5cf Move master to 1.3.0.BUILD-SNAPSHOT 2015-02-26 17:01:02 -08:00
Spring Buildmaster
8f0ad02237 Next development version 2015-02-26 15:26:53 -08:00
Spring Buildmaster
60725cd8bd Next development version 2015-01-07 23:37:07 -08:00
Spring Buildmaster
1a788c1741 Next development version 2014-12-10 16:35:50 -08:00
Stephane Nicoll
fbf8f56a97 Generate standard configuration meta-data
Update the `spring-boot`, `spring-boot-autoconfigure` and
`spring-boot-actuator` project to generate configuration meta-data
files during compilation.

See gh-1001
2014-11-02 21:46:36 -08:00
Dave Syer
49fbf215a1 Switch to Dropwizard metrics 3.1.0
Fixes gh-1775
2014-10-31 18:52:42 +00:00
Brett Wooldridge
9984939c47 Update HikariCP to 2.1.0, compile against the Java 6-compatible artifact
For those running applications on Java 8, dependency management for the
Java 8-compatible artifact is also provided.

Closes gh-1721
2014-10-16 15:21:57 +01:00
Andy Wilkinson
c601c09ecc Upgrade to Hibernate Validator 5.1.2.Final
Closes gh-1595
2014-10-01 17:28:29 +01:00
Stephane Nicoll
3dc932db88 DataSource metrics
This commit adds an abstraction that provides a standard manner to
retrieve various metadata that are shared by most data sources.

DataSourceMetadata is implemented by the three data source
implementations that boot supports out-of-the-box: Tomcat, Hikari and
Commons dbcp.

This abstraction is used to provide two additional metrics per data
source defined in the application: the number of allocated
connection(s) (.active) and the current usage of the connection pool
(.usage).

All such metrics share the 'datasource.' prefix. The prefix is further
qualified for each data source:

* If the data source is the primary data source (that is either the
  only available data source or the one flagged @Primary amongst the
  existing ones), the prefix is "datasource.primary"
* If the data source bean name ends with "dataSource", the prefix is
  the name of the bean without it (i.e. batchDataSource becomes batch)
* In all other cases, the name of the bean is used

It is possible to override part or all of those defaults by
registering a bean with a customized version of
DataSourcePublicMetrics.

Additional DataSourceMetadata implementations for other data source
types can be added very easily, check
DataourceMetadataProvidersConfiguration for more details.

Fixes gh-1013
2014-08-29 11:22:11 +02:00
Stephane Nicoll
249e09d9bc Switch master to 1.2.0.BUILD-SNAPSHOT 2014-07-11 10:44:05 +02:00
Spring Buildmaster
40327e1ae6 Next development version 2014-07-08 02:33:36 -07:00
Spring Buildmaster
981669b7c0 Next development version 2014-06-26 14:09:54 -07:00
Phillip Webb
200cd535c2 Revert "Next development version"
This reverts commit 67189477fe.
2014-06-26 11:03:09 -07:00
Spring Buildmaster
67189477fe Next development version 2014-06-26 10:51:35 -07:00
Phillip Webb
1f36d4657f Fix various Windows related issues
Fixes gh-1168
2014-06-25 14:31:41 -07:00
Spring Buildmaster
542f3cbda8 Next development version 2014-06-24 13:53:56 -07:00
Spring Buildmaster
4ca26a21dc Next development version 2014-06-11 10:46:27 -07:00