I'm using the latest cacti 0.8.7e.
I've created my own simple Data Input Method, Data Source and Graph.
As you can see on the image below the scale interval is 100. I'd like to change the interval to 50 or 20.
I've found cool article that work (test case), but when I change the source code in libs/rrd.php there is no effect on my graph. But other graphs for instance my graph for "Localhost - Traffic - eth0" changed as I didn't what it to be changed. Is there any way I can change y-Axis Scaling?
What I've done?
Disabled this part of this code:
Code: Select all
if (!empty($graph["unit_value"])) {
if (read_config_option("rrdtool_version") != "rrd-1.0.x") {
$unit_value = "--y-grid=" . $graph["unit_value"] . RRD_NL;
}else{
$unit_value = "--unit=" . $graph["unit_value"] . RRD_NL;
}
}
if (ereg("^[0-9]+$", $graph["unit_exponent_value"])) {
$unit_exponent_value = "--units-exponent=" . $graph["unit_exponent_value"] . RRD_NL;
}
Code: Select all
$unit_value = "--alt-y-grid"
RRDTool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Ilosc katalogow w poszczegolnych sciezkach" \
--alt-y-grid \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf \
--font AXIS:8:/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf \
--font LEGEND:8:/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf \
--font UNIT:8:/usr/share/fonts/truetype/msttcorefonts/Verdana.ttf \
DEF:a="/home/stats/public_html/statystyki/rra/localhost_internal_source_dir_87.rrd":internal_source_dir:AVERAGE \
DEF:b="/home/stats/public_html/statystyki/rra/localhost_internal_dir_arch_89.rrd":internal_dir_arch:AVERAGE \
DEF:c="/home/stats/public_html/statystyki/rra/localhost_dit_ext_88.rrd":dit_ext:AVERAGE \
DEF:d="/home/stats/public_html/statystyki/rra/localhost_ext_arch_90.rrd":ext_arch:AVERAGE \
LINE1:a#FF0000FF:"/internal" \
GPRINTLAST:" Current\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s\n" \
LINE1:b#D8ACE0FF:"/internal/archive" \
GPRINTLAST:"Current\:%8.2lf %s" \
GPRINTMAX:"Maximum\:%8.2lf %s\n" \
LINE1:c#00FF00FF:"/external" \
GPRINT:c:LAST:" Current\:%8.2lf %s" \
GPRINT:c:MAX:"Maximum\:%8.2lf %s\n" \
LINE1:d#4444FFFF:"/external/archive" \
GPRINT:d:LAST:"Current\:%8.2lf %s" \
GPRINT:d:MAX:"Maximum\:%8.2lf %s\n"
RRDTool Says:
OK