Open Closed

Microservices and Prometheus Issues #2506


User avatar
0
travom created

Using microservices template. All works fine but for Prometheus: (Using Docker version) and latest ABP commercial 5.1

What is wrong - how to fix?

<br>


5 Answer(s)
  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Probably, you are running prometheus on docker but not the applications on docker. That's why it can not bind container name to endpoint.

    If you are not running the solution on docker, you may have to change the prometheus static_config targets such as -targets: ['auth-server'] to -targets: ['host.docker.internal:44322']

    From infrastructure docs. Change all the target hosts to host:docker.internal:<port>.

  • User Avatar
    0
    travom created

    Hi, thanks for the reply.

    Have done as suggested - all good, but have exception/issue with product-service which seems to be up - see swagger below...any thoughts/suggestions?

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    ProductServiceHttpApiHostModule has some missing configuration for mapping metrics end point.

    Please update OnApplicationInitialization method:

    app.UseConfiguredEndpoints();
    

    to

    app.UseConfiguredEndpoints(endpoints => endpoints.MapMetrics());
    

    This is fixed and will be available from next version.

  • User Avatar
    0
    travom created

    Excellent, thanks for speedy reply...appreciate it...all good now.

    Cheers,

    Mike

  • User Avatar
    0
    gterdem created
    Support Team Senior .NET Developer

    Closing the issue. This will be fixed after version 5.1.3.

    I have refunded your question.

    Thanks for reporting.

Made with ❤️ on ABP v8.2.0-preview Updated on March 25, 2024, 15:11