Adjust Cacti for fine grained Input Data

Cacti is a fine graphing solution for all sorts of use cases. It only has problems with with small range inputs. The result are graphs which lack labels, i.e. being hard to read. This code adjustments fixes this. The following lines in /usr/share/cacti/site/lib/rrd.php need to be adjusted:

if ($graph["auto_scale"] == "on") {
    switch ($graph["auto_scale_opts"]) {
        case "1": /* autoscale ignores lower, upper limit */
            $scale = "--alt-autoscale" . RRD_NL;
            break;

The replacement consists of:

if ($graph["auto_scale"] == "on") {
    switch ($graph["auto_scale_opts"]) {
        case "1": /* autoscale ignores lower, upper limit */
            $scale = "--alt-autoscale --alt-y-grid" . RRD_NL;
            break;

Leave a Comment