Automatic Scaling

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
ChrisAT
Posts: 16
Joined: Sat Sep 29, 2018 6:00 am

Automatic Scaling

Post by ChrisAT »

Hi All,

I finally moved from 0.8.8h to 1.2.27 - and things are generally looking good - the only thing that confuses and drives me nuts is that while I do use one single Graphics template for temperature values from various temperature sources (all rely on the sam single data source template) the scaling for the respective graphs are looking pretty different.

A graph that is looking perfectly fine:
Good scaling
Good scaling
Good.JPG (53.48 KiB) Viewed 684 times
and one that isnt looking great:
Messed up scaling
Messed up scaling
NoGood.JPG (56.06 KiB) Viewed 684 times
How can I sort that out so all the graphs are looking reasonable?

Thanks a lot!

NB: Things are running on a Raspberry Pi, Raspbian Buster. RRD Version is 1.7.1-2
User avatar
macan
Cacti Guru User
Posts: 1137
Joined: Tue Mar 18, 2008 2:30 am
Location: Czech

Re: Automatic Scaling

Post by macan »

Go to templates -> graph -> choose "SNMP - Generic OID Template" -> edit
You can change a lot of things here
Let the Cacti grow!
ChrisAT
Posts: 16
Joined: Sat Sep 29, 2018 6:00 am

Re: Automatic Scaling

Post by ChrisAT »

Thanks for the advice - while having spent quite some time on testing and trying to find a solution I didnt really succeed though.
I simply can't achive a truly reasonable scaling at little changes of values.
To me it seems if changes are getting close to a value of one the scaling doesn't work properly anymore...

So what have I tired?

- I started from scratch, installing a fresh new RaspberryPi OS "Bookworm" and updated all to the latest version
- Installed Cacti from the RaspberryPi repository with its dependencies and upgraded manually to the latest Cacti Version before running an apt update && apt upgrade again
- RRDTool installed is 1.7.2-4+b8
- Reconfigured Cacti manually
- Tested with SNMP - Generic OID Template as well

As previously the outcome for data sources (its 3 digits integer data, deviding by 10 returns the measured temperature with 1 decimal) is very much the same though:

Here the various options I've tried and the respective results:

--alt-y-grid \
--alt-autoscale \
CDEF:cdefa='a,10,/' \

yG&AS&DIV.jpg
yG&AS&DIV.jpg (51.76 KiB) Viewed 608 times

--alt-autoscale \
CDEF:cdefa='a,10,/' \

AS&DIV.jpg
AS&DIV.jpg (55.92 KiB) Viewed 608 times

So by using the CDEF to get the "correct" Temperature values I can decide to either lacking detailed labels/values at the y axis (using -alt-y-grid)

or

having lots showing the same value (without -alt-y-grid)...




--alt-autoscale \
CDEF:None

AS.jpg
AS.jpg (69.85 KiB) Viewed 608 times


--alt-y-grid \
--alt-autoscale \
CDEF:None

yG&AS.jpg
yG&AS.jpg (49.7 KiB) Viewed 608 times

So without using the CDEF I don't get the "correct" Temperature values but - if the bandwidth of values is sufficient - at least a graph with a reasonable amount of labels at the y-axis (without -alt-y-grid)
If the bandwidth of values is NOT sufficient - like eg having a range that only varies by +/- 0.1 degrees also this approach shows lots of labels at the y-axis with the same value (no example here)

or

again a graph lacking detailed labels/values at the y axis (using -alt-y-grid)


Based on this it looks to me like using the -alt-y-grid option simply doesnt work properly anymore - at least compared to 0.8.8h where I remember having changed things in the code a tiny bit (based on https://forums.cacti.net/viewtopic.php?t=21086 and https://www.grosseosterhues.com/2009/07 ... ned-input/).
(Tried the same now as well, but as expected that didnt change anything compared to the option set at graph templates)

Still not sure how I can tackle this. For now the most reasonable workaround is by omitting the CDEF and live with the "incorrect" values at the y-axis (which isnt bight either as I cant necessarily predict the value bandwidth of the respective data source)...

Any further advice would be highly appreciated...
User avatar
TheWitness
Developer
Posts: 17047
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Automatic Scaling

Post by TheWitness »

Somehow I suspect RRDtool may be to blame.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests