What controls the Y-axis of data drawn into graphs

nagiosrrdtool

I've recently set up Nagios for a client and have been wondering about some of the graphs we get out of NagioGrapher.

For example, all systems use the same graph configuration for their physical memory "service". Yet, some looks like this:

enter image description here

Others look like this. Which would be closer to the desired outcome.
enter image description here

Why does the graph for SRV-EXCHANGE have free space between the 12k and 20k line and the graph for SRV-TERRA01 has the upper limit at the top of the graph? One might assume that there are simply values in that range, which cause the graph to be drawn like that, but the legend shows that the recorded max values are well within the expected range.

I've already set graph_lower_limit 1 in the NagiosGrapher configuration to set the lower bound at 0. From what I understand, you can also set a fixed upper limit for rrdtool through the graph_upper_limit directive. But that would set a fixed value as the upper limit as far as I understand it. But I don't really understand why there are these differences in the first place.

Best Answer

Rrdtool graph has some "smarts" about the Y axis to prevent the labels all turning into weird numbers with odd decimals. So it prefers to go up to 2, 5, 10, 20, 50, etc. The docs describe this as "normally the scale is selected from a predefined set of ranges". The upper graph has a max around 12k so that gets rounded up to 20k. There is an option to rrdgraph called --alt-autoscale (and also --alt-autoscale-min and --alt-autoscale-max) which tend to produce tighter graphs, which I generally prefer. See http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html for more details.

Related Topic