Commit Graph

750 Commits

Author SHA1 Message Date
Phillip Webb 67f7079cb2 Formatting 2015-07-09 10:18:05 -07:00
Stephane Nicoll 97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Phillip Webb 5938c967a3 Polish 2015-07-08 14:10:05 -07:00
Dave Syer 7ceb7ce6f6 Add send count to Integration metrics
Fixed gh-3364
2015-07-08 16:13:17 +01:00
Dave Syer 94e41b4190 Fix assertion in broken test 2015-07-08 16:03:25 +01:00
Dave Syer 7410eee34f Add custom condition for /logfile endpoint
Fixes gh-3360
2015-07-08 15:59:05 +01:00
Dave Syer c71196b92d Better segregation of export and redis keys 2015-07-08 15:52:50 +01:00
Stephane Nicoll 54619bec3f Clarify javadoc
This might just be me but when I read the original javadoc it made me
think that caching worked only if the endpoint is accessed anonymously.
2015-07-08 15:05:50 +02:00
Phillip Webb 7dcb79b3b3 Support more lenient DB2 product lookups
Update DataSourceHealthIndicator to support pattern based matching for
DB2 products. Prior to this commit product identifiers of the form
`DB2/LINUXX8664` were not supported.

Fixes gh-3377
2015-07-07 23:18:21 -07:00
Phillip Webb 85535f0882 Disable DB migrations in ApplicationHierarchyTests 2015-07-07 22:17:10 -07: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
Phillip Webb 7e58483ead Add serialization endpoint tests
Test basic serialization in Endpoint tests to ensure that JSON
can always be produced.
2015-07-07 18:31:43 -07:00
Phillip Webb 9b78f5d52e Replace @ConditionalOnExpression conditions
Replace @ConditionalOnExpression usage in auto-configuration in favor
of faster direct Environment access.
2015-07-07 16:27:30 -07:00
Phillip Webb 71dbec381a Create @ManagementContextConfiguration annotation
Replace the previously used `EndpointWebMvcConfiguration`
`spring.factories` key with a dedicated ManagementContextConfiguration
annotation.

Also renamed the EndpointWebMvcHypermediaConfiguration and
EndpointWebMvcConfiguration classes to make it clearer that they are
for the management context.

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb b2fcd77d93 Rework EndpointWebMvcAutoConfiguration port logic
Update the `ManagementServerPort` detection logic to attempt direct
property resolution before looking for a local property bean
definition. Bean definitions provided by auto-configuration classes
are ignored.

This change allow `OnManagementMvcCondition` to use the
`ManagementServerPort` to determine when `EndpointWebMvcConfiguration`
should apply (removing the need to create a temporary context).

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb 4c8c376829 Refactor EndpointPathRequestMatcher
Refactor `EndpointPathRequestMatcher` so that the side effect of setting
`endpointHandlerMapping` in the parent class is a little more obvious.
2015-07-07 15:03:21 -07:00
Stephane Nicoll 774474f8b7 Add hint providers for core properties
Closes gh-3322
2015-07-06 11:57:32 +02:00
Phillip Webb e8085016ba Polish Actuator hypermedia support 2015-07-05 22:28:04 -07:00
izeye 99cd9bdc31 Fix typo
Closes gh-3416
2015-07-05 16:40:41 +02:00
izeye b4f636b33f Fix typo
Closes gh-3411
2015-07-03 02:19:47 -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
Phillip Webb b1f8a692a8 Merge branch '1.2.x' 2015-07-01 19:30:12 -07:00
Phillip Webb 3ef667f0d8 Fix MetricWriterMessageHandler to deal with reset
Update MetricWriterMessageHandler to deal with 'reset' messages and to
log unsupported payload types.

Fixes gh-3378
2015-07-01 18:11:53 -07:00
Phillip Webb d61c38167e Formatting 2015-07-01 16:18:26 -07:00
Dave Syer 5541b3be43 Remove @OnManagementMvcCondition and use a private class
Fixes gh-3373
2015-07-01 09:06:54 +01:00
Phillip Webb b5c435f8c4 Polish Actuator MVC customization support
See gh-3345
2015-06-30 22:09:38 -07:00
Dave Syer 1e464da248 Refactor the Actuator MVC configuration to allow more customization
There is a new spring.factories entry for
org.springframework.boot.actuate.autoconfigure.EndpointWebMvcConfiguration
which loads extra beans into the MVC config for the Actuator.
If the management context is a child context all the beans go in the
child (except the Spring Security filter still). A big bonus is that
you can add WebConfigurerAdapters to configure static resources etc.
A new component called ManagementContextResolver can be used to
locate the ApplicationContext for the MVC endpoints.

Fixes gh-3345
2015-06-30 09:42:58 +01:00
Phillip Webb b68382f3ba Polish 2015-06-26 16:06:11 -07:00
Dave Syer 1f6ac52b96 Change default behaviour of /health when not secured
The default is now to reveal all details unless sensitive=true
(instead of only revealing then if sensitive was explicitly false).
The definition of "secure" also changes to something more sensible
where it is only true if security is enabled.

Fixes gh-2816
2015-06-26 13:44:52 +01:00
Dave Syer c3c1d91f74 Fix Redis metrics default settings
The default should be to generate a key from the prefix. Otherwise
if user sets the prefix and not the key it can pick up metrics from
another repository (which is what happens in the tests).
2015-06-26 12:37:09 +01:00
Stephane Nicoll 12767a43e2 Remove unnecessary import
See gh-3335
2015-06-26 08:26:16 +02:00
izeye 761c985337 Remove unnecessary `@After` callback
`@After` callback was trying to remove the wrong file anyway. This is
now taken care of by the `TemporaryFolder` rule.

Closes gh-3335
2015-06-26 08:25:18 +02:00
Stephane Nicoll 56b13800ae Fix json structure 2015-06-25 10:25:21 +02:00
Phillip Webb 134bc02404 Extract common metric Buffer code
Extract common features from CounterBuffers and GuageBuffers into
a shared superclass. The new extracted types allows the service
implementations to be simplified.

Fixes gh-3257
2015-06-24 20:05:37 -07:00
Stephane Nicoll 41b4d41f11 Remove dead code 2015-06-24 15:57:43 +02:00
Stephane Nicoll e9baa779cc Remove dead code 2015-06-24 15:52:27 +02:00
Johannes Stelzer 308a5eaff5 Add /logfile MVC actuator endpoint
Add a `/logfile` endpoint which can be used to fetch the contents of
the log file (if one is being used).

Fixes gh-2137
Closes gh-2294
2015-06-23 17:14:40 -07:00
Phillip Webb 61fc4f3f12 Polish copyright headers 2015-06-23 10:22:14 -07:00
Stephane Nicoll d0698bd8ed Remove unnecessary System.out in tests 2015-06-23 15:57:40 +02:00
Tomasz Przybyła becced5f0b Add `spring.pid.fail-on-write-error` support
Update `ApplicationPidFileWriter` to support a 'fail on write error'
properties which allows the user to exit the application if the PID
file cannot be written.

This commit also deprecates `spring.pidfile` in favor of
`spring.pid.file` so that the new property can be added without overlap.

Fixes gh-2764
2015-06-22 23:43:58 -07:00
Andy Wilkinson d3d713d0c9 Merge branch '1.2.x' 2015-06-22 15:30:15 +01:00
olivier bourgain 5ed2a9632b Make InMemoryTraceRepository thread-safe
Closes gh-3027
2015-06-22 15:30:00 +01:00
Phillip Webb 2f16a01dd5 Polish 2015-06-18 14:11:40 -07:00
dgomesbr 1ebbf8ac4d Upgrade to Hazelcast 3.5
Closes gh-3267
Closes gh-3272
2015-06-18 14:12:28 +02:00
Stephane Nicoll 7ed1aa279a Add Informix specific health query
Closes gh-1287
2015-06-18 10:13:32 +02:00
Johannes Stelzer ea2a09cbf6 Add DB2 specific health query
Closes gh-2565
2015-06-18 10:11:02 +02:00
Stephane Nicoll fd5d6ef303 Polish 2015-06-18 08:52:47 +02:00
nlejeune 205c86f54c Better sanitizer default for sensitive keys
Add the CloudFoundry vcap_services key, as well as a regular expression
to sanitize any key containing the word 'credentials'.

Fixes gh-3248
Closes gh-3266
2015-06-18 08:11:39 +02:00
Stephane Nicoll c177a774a5 Provide seamless support for local.server.port
Previously, the actual HTTP port on which a web application is running on
was only exposed in tests. This commit makes sure to provide that feature
regardless of the environment so that applications can know on which port
they are actually running on.

If there are several containers, each is exposed via the namespace of
their respective application context.

Closes gh-3259
2015-06-17 11:47:05 +02:00
Phillip Webb 8b9c38085a Merge pull request #3117 from izeye/metrics
* metrics2:
  Remove duplicate code in new metrics code
2015-06-16 22:03:43 -07:00