mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
29 lines
595 B
Plaintext
29 lines
595 B
Plaintext
Spring Boot sample with Open TSDB export for metrics.
|
|
|
|
Start opentsdb, e.g. with [Docker Compose]()
|
|
|
|
[source,indent=0]
|
|
----
|
|
$ docker-compose up
|
|
----
|
|
|
|
Run the app and ping the home page (http://localhost:8080) a few times. Go and look at
|
|
the result in the TSD UI, e.g.
|
|
|
|
[source,indent=0]
|
|
----
|
|
$ curl localhost:4242/api/query?start=1h-ago&m=max:counter.status.200.root
|
|
[
|
|
{
|
|
"metric": "counter.status.200.root",
|
|
"tags": {
|
|
"prefix": "spring.b968a76"
|
|
},
|
|
"aggregateTags": [],
|
|
"dps": {
|
|
"1430492872": 2,
|
|
"1430492875": 6
|
|
}
|
|
}
|
|
]
|
|
---- |