Commit Graph

1331 Commits

Author SHA1 Message Date
Andy Wilkinson 5c9aa41c07 Update InMemoryRichGaugeRepository to support increments
Closes gh-2902
2017-01-17 17:15:26 +00:00
Andy Wilkinson 7fa33cddd7 Merge branch '1.4.x' into 1.5.x 2017-01-17 15:00:01 +00:00
Andy Wilkinson a02c2d4155 Improve the documentation of Health.Status constants
Closes gh-7784
2017-01-17 14:59:53 +00:00
Johnny Lim acc36c076d Polish
See gh-8004
2017-01-17 09:53:50 +01:00
Andy Wilkinson f72799186e Merge branch '1.4.x' into 1.5.x 2017-01-16 11:47:52 +00:00
Andy Wilkinson a72365e1a2 Expose context hierarchy in beans endpoint
Previously, the beans endpoint would only expose the context that
contained the endpoint. This commit updates the endpoint so that
the context that contains the endpoint and all of its ancestors are
exposed.

In a context hierarhcy, the relation ship is child -> parent and there
is no way to navigate from a parent to a child. As a result, any
contexts that are descendants of the context containing the endpoint
are not exposed.

Closes gh-5188
2017-01-16 11:47:14 +00:00
Stephane Nicoll 8bef0a1e60 Polish contribution
Closes gh-7905
2017-01-16 11:24:36 +01:00
Eddú Meléndez b2250f4ad8 Add LDAP health actuator
Provide specific health actuator endpoint to verify if LDAP connection
is valid.

See gh-7905
2017-01-16 10:56:49 +01:00
Stephane Nicoll f21c767356 Polish contribution
Closes gh-7914
2017-01-15 09:45:32 +01:00
Kazuki Shimizu a6756c9ed3 Allow lowercase logger level on MVC endpoint
See gh-7914
2017-01-15 09:42:40 +01:00
Andy Wilkinson ae3434ba4c Merge branch '1.4.x' into 1.5.x 2017-01-13 18:45:50 -05:00
Andy Wilkinson d2201d5284 Correct copyright dates and enforce that starting year is 2012
Closes gh-7923
2017-01-13 18:43:30 -05:00
Phillip Webb 9159c87bf9 Polish 2017-01-10 09:51:11 -05:00
Stephane Nicoll fefc66625f Merge branch '1.4.x' into 1.5.x 2017-01-08 09:20:00 +01:00
Eddú Meléndez f896ff9a10 Fix incomplete assertions
Closes gh-7907
2017-01-08 09:12:54 +01:00
Madhura Bhave 4ea47220e9 Match nested paths for insensitive actuators
Update `ManagementWebSecurityAutoConfiguration` to match nested path
for insensitive actuators.

Prior to this commit, when Spring Security was on the classpath
nested paths were considered sensitive (even if the actuator
endpoint was not sensitive). i.e. when setting
`endpoints.env.sensitive=false` `/env` could be accessed without
authentication but `/env/user` could not.

Fixes gh-7868
Closes gh-7881
2017-01-05 18:45:30 -08:00
Johnny Lim f915ae197a Polish 2017-01-04 09:53:45 +01:00
Madhura Bhave 530c3cd3be Simplify HealthMvcEndpoint security
Expose full health details if management security is disabled or
management role is present.

Fixes gh-7604
Closes gh-7852
2017-01-03 19:00:14 -08:00
Phillip Webb 2fe4d60b47 Add `management.cloudfoundry.*` meta-data
Update configuration meta-data and appendix to include
`management.cloudfoundry.*` meta-data.

See gh-7108
2017-01-03 17:24:58 -08:00
Phillip Webb 8ccd4db513 Merge branch '1.4.x' into 1.5.x 2017-01-03 15:14:14 -08:00
Phillip Webb 732011987d Fix ManagementContextConfiguration @Order support
Update `ManagementContextConfigurationsImportSelector` to instantiate
classes so that order annotations are respected.

Fixes gh-7814
2017-01-03 15:12:35 -08:00
Phillip Webb b4b8370632 Fix AuditEventsJmxEndpoint bean name
See gh-6579
2017-01-03 14:43:24 -08:00
Phillip Webb 8a9a61b64f Prevent duplicate JmxEndpoint MBean registration
Update JmxEndpoint support so that the `@ManagedResource` annotation
is no longer required. This prevents both `EndpointMBeanExporter` and
the regular `AnnotationMBeanExporter` from both registering the bean.

Fixes gh-7813
See gh-6579
2017-01-03 14:43:24 -08:00
Phillip Webb 51762642b2 Polish audit event endpoint support
Closes gh-6579
2017-01-02 19:43:26 -08:00
Phillip Webb 5b40eb48e0 Improve MBean without backing Endpoint support
Improve support for MBeans without a backing endpoint by introducing
a `JmxEndpoint` interface. The `JmxEndpoint` is intentionally
similar in design to the `MvcEndpoint` from the `mvc` package and
allows for completely custom JMX beans that are not backed by any
real actuator `Endpoint`.

The `AuditEventsMBean` has been refactored to use the new interface and
has been renamed to `AuditEventsJmxEndpoint`.

See gh-6579
2017-01-02 19:43:14 -08:00
Vedran Pavic 2f1e4f0c02 Add MVC and JMX endpoints to retrieve audit events
Add MVC and JMX specific endpoints that allow audit events to be
retrieved.

See gh-6579
2017-01-02 19:20:35 -08:00
Vedran Pavic a6d18f714f Add JMX without backing `Endpoint` support
Decompose `EndpointMBean` to improve support for JMX endpoints without
a backing `Endpoint`.

See gh-6579
2017-01-02 19:19:04 -08:00
Phillip Webb e1eb48e8b4 Fix warnings 2016-12-30 17:26:25 -08:00
Phillip Webb a167db7b37 Allow OPTIONS requests in interceptors
Update `MvcEndpointSecurityInterceptor` and
`CloudFoundrySecurityInterceptor` to allow OPTIONS requests to be
processed.

Fixes gh-7720
2016-12-30 14:05:29 -08:00
Phillip Webb aacf5d660f Update copyright year for changed files 2016-12-30 11:53:51 -08:00
Phillip Webb 367963f29f Polish 2016-12-28 15:41:00 -08:00
Phillip Webb 8b69856fc9 Polish 2016-12-28 15:23:26 -08:00
Stephane Nicoll 8b7055719f Move InMemoryMultiMetricRepository to a separate class
This commit moves the `MultiMetricRepository` implementation from
`InMemoryMetricRepository` to `InMemoryMultiMetricRepository`. Both
implementations can share the same underlying store (and are for backward
compatible reasons).

The side effect is that `reset` now works as expected for a group.

Closes gh-7687
2016-12-28 18:16:10 +01:00
Phillip Webb 3af5ae2a26 Polish `ObjectProvider` names
Consistently use the simple name for ObjectProvider parameter and
field names. For example:

  `ObjectProvider<Something> something`

rather than

  `ObjectProvider<Something> somethingProvider`
2016-12-27 15:04:06 -08:00
Phillip Webb e0541d0f74 Polish 2016-12-27 14:48:44 -08:00
Stephane Nicoll 0d4ef3dbdb Fix formatting 2016-12-27 11:41:53 +01:00
Stephane Nicoll d0fa72a169 Filter AbstractRoutingDataSource from health indicator
Closes gh-6806
2016-12-27 10:11:52 +01:00
Spring Buildmaster 9057f9ae1f Next development version 2016-12-23 00:15:23 +00:00
Stephane Nicoll 5d909a969f Polish contribution
Closes gh-6613
2016-12-22 11:44:49 +01:00
Eddú Meléndez 53d25999f3 Add support for multiple beans in the Flyway and Liquibase endpoints
Closes gh-6610
See gh-6613
2016-12-22 11:44:12 +01:00
Phillip Webb b87e02dde0 Polish Spring Integration metrics support
See gh-7722
2016-12-21 20:18:06 -08:00
Artem Bilan d69e43b433 Refactor Spring Integration metrics support
Update Spring Integration metrics support since Spring Integration
`4.3.6`+ no longer needs `spring-integration-jmx` enable
`MessageChannel`, `MessageHandler` and `MessageSource` metrics.

- Add `IntegrationManagementConfiguration` conditional auto-configuration
  to provide `@EnableIntegrationManagement` when JMX is `enabled` or there
  is no `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean.
  By default this bean doesn't exist and you explicitly should declare it
  (e.g. via `@EnableIntegrationManagement`) if you would like to collect
  metrics. At the same time Spring Integration enables it when JMX
  management is present (that is a purpose of that new
  `IntegrationManagementConfiguration`)

- Change `SpringIntegrationMetricReader` to read metrics from the
  `IntegrationManagementConfigurer`, not `IntegrationMBeanExporter`

- Change `PublicMetricsAutoConfiguration` to register
  `IntegrationManagementConfigurer.MANAGEMENT_CONFIGURER_NAME` bean if
  not present. Since we are here in `actuator`, therefore we are
  interested in the metrics for SI as well.

- Since we don't need JMX for the metrics any more, remove SI-JMX
  dependency from the `spring-boot-starter-integration`.

- Remove `IntegrationManagementConfiguration` modification from the
  `integrationMbeanExporter()`, since that looks like mutation of an
  external object, when end-user would prefer their own options.
  Therefore we don't need `ObjectProvider<IntegrationManagementConfigurer>`, too

- Add missed `MessageSourceMetrics` gathering for the
  `SpringIntegrationMetricReader`

Closes gh-7722
2016-12-21 20:18:06 -08:00
Johnny Lim e12b4a944f Polish 2016-12-21 20:18:04 -08:00
Phillip Webb 38f7389eab Polish loggers 2016-12-20 21:16:40 -08:00
Phillip Webb c76bd2d81e Refine error message from Endpoint MVC security
Update the error message to return less information to the client.
Details of how to disable security are now written to the log instead.

See gh-7605
See gh-7634
2016-12-20 18:47:39 -08:00
Madhura Bhave 38eeae2166 Send error with message from Endpoint MVC security
Update `MvcEndpointSecurityInterceptor` to that it sends an error in the
same way as Spring Security. Prior to this commit the `ErrorController`
would not handle endpoint security errors.

Fixes gh-7605
Closes gh-7634
2016-12-20 18:27:25 -08:00
Phillip Webb dba8ef2ba8 Polish CF management skip SSL opt-in
See gh-7629
See gh-7655
2016-12-20 18:25:32 -08:00
Madhura Bhave 34712cbf76 Switch CF management skip SSL to opt-in
Change CloudFoundryActuatorAutoConfiguration so that skipping of SSL
verification is now opt-in rather than enabled by default.

Fixes gh-7629
Closes gh-7655
2016-12-20 18:24:15 -08:00
Phillip Webb 06a7ab0cd5 Polish ReservoirFactory support
Polish Dropwizrd reservoir support including a refactor of
`ReservoirFactory` to allow reservoirs to be created based on a
metric name.

See gh-5199
See gh-7105
2016-12-20 15:12:14 -08:00
Lucas Saldanha 1fc2e87053 Enable custom Reservoir with Dropwizard metrics
Uses the ReservoirFactory to customize the implementation of
the Reservoir that will be used when creating Timer and Histogram
in the DropwizardMetricServices.

Fixes gh-5199
Closes gh-7105
2016-12-20 14:56:29 -08:00