Y axis needs to start at zero for GAUGE graph

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

Moderators: Developers, Moderators

Post Reply
mlambie
Posts: 9
Joined: Wed Feb 18, 2004 3:01 am
Location: Perth, Western Australia
Contact:

Y axis needs to start at zero for GAUGE graph

Post by mlambie »

Hello,

I've got a script that returns an integer via SNMP (using extend). I'm graphing it as a GAUGE which works fine, though the Y axis does not start at zero. Instead it's showing me a scaled axis which covers the range of values. I'd prefer to have all the values from 0 to <value> graphed.

Can anyone point me in the right direction? I've scoured the forums but am probably using the wrong keywords.

Thanks very much!

EDIT 1:

This is the graph debug information. I am guessing the "alt-autoscale-max" parameter has something to do with what I need. How can I get in to edit this? I'm using a SNMP - Generic OID Template.

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="prime - Enabled Sites" \
--base=1000 \
--height=120 \
--width=750 \
--alt-autoscale-max \
--vertical-label="enabled sites" \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/lib/cacti/rra/prime_snmp_oid_480.rrd":snmp_oid:AVERAGE \
DEF:b="/var/lib/cacti/rra/prime_snmp_oid_480.rrd":snmp_oid:MAX \
AREA:a#750F7DFF:"Enabled Sites"  \
GPRINT:a:LAST:"Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s\n"
Matt Lambie
Chief Information Officer
THE FRONTIER GROUP
mlambie
Posts: 9
Joined: Wed Feb 18, 2004 3:01 am
Location: Perth, Western Australia
Contact:

Solved!

Post by mlambie »

I edited the Generic SNMP OID Template and made auto scaling a checkbox selection. This means that my graphs now start at zero, for all Generic SNMP OID graphs, which is what I wanted.
Matt Lambie
Chief Information Officer
THE FRONTIER GROUP
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Fine. The autoscale options, along with max and min, are indeed the correct way to go
Reinhard
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests