1

I am new to grafana & prometheus. I want to graph the change in a value (here disk space used), but as a percentage of the initial value, which one commonly sees for inflation charts.

For example, this chart of inflation has every line starting at 100% at the left, and then each point is the value at that time, as a percentage of the initial value. I want to make a chart like that in grafana. When I change the time period for the dashboard/chart, it should always use the initial value as the 100%.

Grafana v9.2.5 and Prometheus v2.31.2

Amandasaurus
  • 31,471
  • 65
  • 192
  • 253

1 Answers1

0

You could use query like your_metric / your_metric @ start(), for example

node_systemd_timer_last_trigger_seconds{name =~ "apt.*"} / node_systemd_timer_last_trigger_seconds{name =~ "apt.*"} @ start()

and set in options of your Time Series dashboard > Standard options > Unit > Percent (0.0-1.0)

markalex
  • 126
  • 6