Search code examples
javaspring-bootspring-boot-actuatorgraphitespring-micrometer

in graphite server - actuator/metrics/http.server.requests count not updating


I have a spring boot project up and running. I have also configured dependency for micrometer-registry-graphite in pom file. And I have installed graphite using docker (downloaded latest version - 1.1.6) and it is running in localhost:80

When I hit the below url it properly shows the hit count. http://localhost:5080/api/v1/actuator/metrics/http.server.requests?tag=uri:/queue/{queueId}&tag=status:200

Below is the response,

{
    "name": "http.server.requests",
    "description": null,
    "baseUnit": "milliseconds",
    "measurements": [
        {
            "statistic": "COUNT",
            "value": 29.0
        },
        {
            "statistic": "TOTAL_TIME",
            "value": 942.520949
        },
        {
            "statistic": "MAX",
            "value": 0.0
        }
    ],
    "availableTags": [
        {
            "tag": "exception",
            "values": [
                "None"
            ]
        },
        {
            "tag": "method",
            "values": [
                "GET"
            ]
        },
        {
            "tag": "outcome",
            "values": [
                "SUCCESS"
            ]
        }
    ]
}

When I navigate to Graphite Browser, I'm not able to get the count value which I got previously using actuator/metrics url. [We can see the service's url queue/queueId is transformed to some hierarchy form]. And I can see different hierarchical structure (attached the image), why it is showing under exception, None and other unrelated hierarchy. Can someone please explain this and I'm in need of solution to get the hit count in graphite server.

Spring boot version: 2.2.4 RELEASE and micrometer-registry-graphite version: 1.3.2


Solution

  • I have wrongly pointing my graphite server with port-80 in bootstrap.yml. But port-80 listening fo nginx, where it should point to port-2004 which is listening for carbon receiver. After this change in bootstrap.yml I'm able to resolve this issue.