Aggregate, now at V0.66

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Locked
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I can't reproduce your error. But I suppose it is an initialization error. Please try to change setup.php to read (starting at line 414)

Code: Select all

        /* loop through each of the graph_items selected on the previous page for skipped items */
        $skipped_items   = array();
        $hr_items        = array();
        $color_templates = array();
        while (list($var,$val) = each($_POST)) {
The "array()" statement will initialize those arrays.
Reinhard
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

:(

Code: Select all

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset: 2' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  3' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  4' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  5' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  7' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  8' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  9' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  10' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  2' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  3' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  4' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  5' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  7' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  8' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  9' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

PROGERR: ERRNO:'8' TYPE:'Notice' MESSAGE:'Undefined offset:  10' IN FILE:'/opt/cacti/plugins/aggregate/setup.php' LINE NO:'275'

btw into graph management i can see the graph :) :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Some progress made, but not all problems solved, then.
It seems to me, that your php performs stricter code checks compared to mine. Wait ...
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please replace line 275 of setup.php by

Code: Select all

if (isset($_color_templates[$i])) {
Reinhard
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Uhm, now no errors, but:


RRDTOOL IN DEBUG:

RRDTool Says:

ERROR: Legend set but no color: devicename Inbound



Simon
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Ok, resolved choosing a Color Template or choosing later a color for the DS.

Thank's Reindard for your great help and job :)
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

xefil wrote:Uhm, now no errors, but:


RRDTOOL IN DEBUG:

RRDTool Says:

ERROR: Legend set but no color: devicename Inbound



Simon
Ok. This requires some more testing as it is perfectly ok not to select a Color Template. Would you be able to post the whole rrdtool graph statement for this case?
Reinhard
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Here, not choosing any Color Template, it creates the Aggregate graph, butwithout any color:

Code: Select all

 RRDTool Command:

/usr/local/rrdtool/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Aggregate TEST" \
--rigid \
--base=1000 \
--height=200 \
--width=600 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="bits per second" \
--slope-mode \
DEF:a="/opt/cacti/rra/traffic_in_29.rrd":traffic_in:AVERAGE \
DEF:b="/opt/cacti/rra/traffic_in_29.rrd":traffic_out:AVERAGE \
DEF:c="/opt/cacti/rra/traffic_in_30.rrd":traffic_in:AVERAGE \
DEF:d="/opt/cacti/rra/traffic_in_30.rrd":traffic_out:AVERAGE \
CDEF:cdefa=a,8,* \
CDEF:cdeff=b,8,* \
CDEF:cdefba=c,8,* \
CDEF:cdefbf=d,8,* \
AREA:cdefa:" Inbound"  \
GPRINT:cdefa:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefa:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefa:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total In\:  31.65 GB\n"  \
LINE1:cdeff:" Outbound"  \
GPRINT:cdeff:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdeff:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdeff:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total Out\: 4.41 GB"  \
AREA:cdefba:" Inbound"  \
GPRINT:cdefba:LAST:" Current\:%8.2lf %s"  \
GPRINT:cdefba:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefba:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total In\:  6.05 MB\n"  \
LINE1:cdefbf:" Outbound"  \
GPRINT:cdefbf:LAST:"Current\:%8.2lf %s"  \
GPRINT:cdefbf:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:cdefbf:MAX:"Maximum\:%8.2lf %s"  \
COMMENT:"Total Out\: 4.15 GB" 
Bye, Simon
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

There is another BUG:
If i choose to sum different interfaces, and convert it to AREA/STACK I obtain a graph with wrong sequence AREA/STACK. Nothing important, It needs only to move the other DS in the right sequence.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post the "rrdtool graph" statement from this before moving items
Thanks
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

The latest revision is 0.62. Some few errors were fixed
Reinhard
Attachments
aggregate-v0.62.tgz
The Code
(22.75 KiB) Downloaded 2854 times
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

To update from 0.61 should I:
  • re-import SQL
    owerride all files into cacti/plugins/aggregate/
What about "plugin_graphs.patch"?

Bye, Simon
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

xefil wrote:re-import SQL
No.
owerride all files into cacti/plugins/aggregate/
Yes.
What about "plugin_graphs.patch"?
Still only needed if plugin arch is at level v1.0. And if you alreday applied it once, leave it alone. Nothing has changed here.
Reinhard
xefil
Cacti User
Posts: 233
Joined: Tue Jun 20, 2006 2:48 am
Location: Italy
Contact:

Post by xefil »

Thank's, it works!
And now stack/area graphs are right :)
clandagent
Posts: 11
Joined: Thu Apr 19, 2007 5:33 pm

Different kind of aggregate than I was expecting...

Post by clandagent »

I'm a bit curious if what I've got working is in fact working correctly... By aggregate, do you mean it shows multiple interface values on a single graph? Or do you mean it adds the values of each interface and displays the total "aggregate" on a single graph? The result it's giving me is the former. If that's what it's supposed to do, does anyone know how to make cacti do an aggregate that's a total of combined interfaces?
Locked

Who is online

Users browsing this forum: No registered users and 3 guests