Pretty print JSON output of Spring Boot Actuator endpoints

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

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

/metrics
/b         


        
14条回答
  •  别那么骄傲
    2020-12-24 12:58

    I use jq for pretty printing JSON as well as filtering it. It's basically sed for JSON. On the mac, it can be installed with homebrew. (https://stedolan.github.io/jq/)

    curl http://localhost:8080/metrics | jq 
    

提交回复
热议问题