Advanced Graphing (Part3): Right Y-axis & Log scales

Right Y-Axis

Sometimes it’s useful to graph time series that differ by orders of magnitude but are still related or correlated. For example memory and CPU usage. Grafana allows you to assign series to a second (Right) Y-axis which can have separate unit & scale.

You can assign a series to the Right Y-Axis by clicking on the colored line icon to the left of the series name in the graph legend.

Example graph:

Log scale

Another way visualize series that differ by orders of magnitude is to use a logarithmic scales. This is really useful for data usage or latency measurements. The goal here is to avoid one series dominating and delegating all the others to the bottom of the graph.

Example with default linear scale:

As you can see in the above graph the used series is so much higher than the other series that you cannot distinguish between the other two as they are both delegated to the bottom pixels of the graph.

To switch to a logarithmic scale go into edit mode (just press e on keyboard while hovering over panel) and Axes tab.

Result:

Now all series are visible and we can actually see the difference between them.

2 Likes

Another example of log scale usage.

Two metrics are displayed on a graph. Each metric has a normal value less than one and a spike to a hundred. Changing scale to log scale helps to visualize the data, but axes and toolip are not really informative:
image

To resolve it we first go to the Axes and hardcode Left-Y → Decimals value as 4, thus forcing left-Y show four decimal places.
Then we go to Legend and hardcode Values → Decimals value as 4, thus forcing a toolip to show four decimal places.

image

yup, that’s totally intuitive. not.

3 Likes

Does this work for repeating panels?

I have 6.3.5-1 installed and have set the right y-axis for one of my metrics on a repeating panel, but it only seems to work for the first panel on initial load.

If I update the other panels I can view it, but I cannot save this change.

Thanks,
Stuart

1 Like

Is it possible to have different draw modes (i.e bar, line) for the left and right Y-axis ?
Is it possible to stack only the left Y-axis series ?

On 7.x, at least, you can also use a Series Override.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.