j-money
j-money

Reputation: 529

spring-boot actuator endpoint values

I am wondering if anyone can shed some light onto where the values are coming from in the spring-boot actuator endpoints such as /health or /metrics. Under /health it displays diskSpace as

diskSpace :  {
     status: UP
     total : 983430832128
     free  : 915480453120
}

where are these values coming from? My personal machine? I am confused because these values would make sense (assuming its a measurement in bytes) as this is how much local diskspace I have. However under /metrics it shows

mem: 319858

which is nowhere near the amount of memory my machine has, but again under /metrics the load average is the same as my machine (roughly)

Upvotes: 1

Views: 1150

Answers (1)

pvpkiran
pvpkiran

Reputation: 27068

As you have rightly guessed

diskSpace :  {
     status: UP
     total : 983430832128
     free  : 915480453120
}

Indicates total and free space in your local machine. This is coming from DiskSpaceHealthIndicator. Search for this class and look at the code. Here is the code. And yes, it is in bytes.

mem: 319858

This is from /metrics. If you look at the documentation

Shows ‘metrics’ information for the current application.

In this case application means the jvm. So it is the memory you allocated (or by default assumed) when jvm was started.

Upvotes: 1

Related Questions