Hey Shrikant

You've defined base path as /app/metrics. If you want metrics at the
/actuator endpoint then you'll have to remove the
management.endpoints.web.base-path=/app/metrics property.

Refer
https://docs.spring.io/spring-boot/docs/2.1.11.RELEASE/reference/html/production-ready-monitoring.html

On Tue, 22 Jun 2021, 00:38 SRIKANT MVS, <srikant....@gmail.com> wrote:

> Hi Nikhil,
> Iam using springboot actuator 2.5 version.Below is how I have configured.
>
> management.server.port=8080
>
> management.endpoint.info.enabled=true
>
> management.endpoint.health.enabled=true
>
> management.endpoint.metrics.enabled=true
>
> management.endpoints.web.base-path=/app/metrics
>
> management.endpoints.web.exposure.include=info, health, metrics
> -Regards
> Srikant
>
> On Mon, 21 Jun, 2021, 19:55 Nikhil Vibhav, <nikhil92...@gmail.com> wrote:
>
> > Don't know if you've already tried this but, if you hit
> > http://localhost:8080/actuator it should show you the available
> endpoints.
> >
> > With spring boot 2.x you have to enable all/each endpoint using the
> > property *management.endpoints.web.exposure.include=** (or if you just
> want
> > metrics, replace *** with *metrics*)
> >
> > By default, spring boot only enables the /actuator/health and
> > /actuator/info.
> > On Mon, 21 Jun 2021, 23:12 SRIKANT MVS, <srikant....@gmail.com> wrote:
> >
> > > Yes Mark, Spring-web dependency is also added, still not working.
> > >
> > > -Regards
> > > Srikant
> > >
> > > On Mon, 21 Jun, 2021, 19:16 Mark Nuttall, <mknutt...@gmail.com> wrote:
> > >
> > > > For an app to expose http endpoints, it has to be a "web app".
> > > >
> > > > Why not just add the spring boot web dependency?
> > > >
> > > > On Mon, Jun 21, 2021 at 12:51 PM SRIKANT MVS <srikant....@gmail.com>
> > > > wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I am running a kafka consumer application using
> > > > camel-spring-boot-starter.
> > > > > The SpringBoot application implements CommandLineRunner. The below
> > > > property
> > > > > is configured in my application.
> > > > >
> > > > > camel.springboot.main-run-controller=true
> > > > >
> > > > > I am trying to expose the springboot actuator metrics on the port
> > 8080,
> > > > but
> > > > > I am facing challenges in exposing the endpoint as it’s a non-web
> > > > > application.
> > > > >
> > > > > The url http://localhost:8080/actuator/metrics gives 404 status
> > code.
> > > > >
> > > > > How can I expose the actuator “/metrics” on an HTTP endpoint for my
> > use
> > > > > case ?
> > > > >
> > > > > Note: Actuator and Camel-management dependencies are available in
> the
> > > > > classpath.
> > > > >
> > > > > -Regards
> > > > >
> > > > > Srikant Mantha
> > > > >
> > > >
> > >
> >
>

Reply via email to