Pretty print JSON output of Spring Boot Actuator endpoints

前端 未结 14 1001
终归单人心
终归单人心 2020-12-24 12:30

Spring Boot Actuator provides several endpoints to monitor an application as:

/metrics
/b         


        
14条回答
  •  星月不相逢
    2020-12-24 13:13

    Instead of using curl I like to use httpie as a http command line client:

    http http://localhost:8080/metrics

    This would already format and syntax highlight the json response without having to pipe the output into another command. Also the command syntax is a bit more human friendly.

提交回复
热议问题