Search code examples
grafanametricsspring-boot-actuator

springboot actuator "disk_free" metrics


  • What I am trying to achieve:

With the metric "disk_free" from springboot pet clinic application, I would like to create a visual where the unit is more representative of a disk, such as in MB or GB.

The visual of something I would like to achieve looks like this:

enter image description here

  • The expected result and actual result:

I want to create a visual similar to the one above, where units are in MB/GB. But instead, it is in "Tri"

enter image description here

  • What I tried:

I applied the query "disk_free" and got some value results back. Unfortunately, the unit seems to be quite unclear.

  • Question:

How to change the unit to something more representative of a disk (such as MB, GB, etc) without hardcoding it?


Solution

  • In the standard options for your visualisation panel, there is an option to set the unit that your measurement is in.

    If you type the word 'data', you'll see relevant options that will set your legend to be more readable. It's most likely you'll want to use one of the options for bytes but it depends on your metric unit.

    Panel unit options