Aggregate, now at V0.66

Announcements concerning Plugins for Cacti

Moderators: Developers, Moderators

Locked
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Gandolf,

How many DEF's can you fit into an Aggregate graph before the OS complains about string lengths?

Larry
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?
pwohlers
Posts: 22
Joined: Mon Jun 04, 2007 1:36 pm

Post by pwohlers »

The aggregate plugin really opens up a ton of possibilities. Very grateful. Thanks.

I am however, having problems with the summation cdef to gprint a total at the bottom of the graph.

In the 'graph items' view, you choose a data source (but only a single one), etc for the cdef function drop-down, there's an option for 'total all data sources'.

Unfortunately those don't really seem to help the reporting.

I've tried using things like:
|100:bits:auto:aggregate_sum:2|

(report 100th percentile of the aggregated sum of the data sources - or so I thought) as an hrule value (and trying various different incantations from the 'variables' link you posted), but the best I can seem to get is an aggregation of the data values seen on the first data source as defined in the 'data source' dropdown.

What am I missing?

Maybe this type of functionality can be integrated into an upcoming version?

This particular graph is being used to report aggregate outbound bandwidth...

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

Post by gandalf »

TheWitness wrote:Gandolf,

How many DEF's can you fit into an Aggregate graph before the OS complains about string lengths?

Larry
I#M quite sure that rrdtool does not introduce any limits here. So it's going to be OS dependant. IMHO, most unix flavours will accept 2k. Don't ask me for windows
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

pwohlers wrote:...
Maybe this type of functionality can be integrated into an upcoming version?
...
This is the most wanted feature up to now. I've made up my mind to cover this issue outside my plugin by writing a new howto. To be honest, during the last 3 months I did not find any time to do so. On my priority list, it's not the most pressing one, though
Reinhard
cschutte
Posts: 1
Joined: Mon Dec 19, 2005 6:26 am

Post by cschutte »

I also get this error (refer problem logged by iYRe in May):

PROGERR: ERRNO:'2048' TYPE:'' MESSAGE:'Assigning the return value of new by reference is deprecated' IN FILE:'/usr/share/cacti/site/lib/adodb/adodb-lib.inc.php' LINE NO:'537'

I just installed v0.63 and plugin arc 1.1, and the error message appears when I have selected 2 graphs, executed the aggregate option, and then selecting YES to confirm.

Was this problem resolved? I could not find a solution in the forums.

Regards
User avatar
majherek
Posts: 2
Joined: Wed Aug 01, 2007 11:59 am
Location: Warsaw, Poland

Problem with aggregate percentage disk space

Post by majherek »

Hi,

I'm new in cacti.

I want to create image of disk usage like this:

Image.

So I add in "Data templates"=>"Unix - Hard Drive Space" two additional "Data Source Item": hdd_percentage and hdd_total.
After that in "Data Queries"=>"Unix - Get Mounted Partitions" I add a new "Associated Graph Templates", which I created earlier, and associate data sources.

And now I have graphs like this:

Image.

After that I want to aggregate those graphs (one for each partition).
In results I get:

Image.


The problem is in 'legent': why there are spaces??? (due to this everything is unreadable).


Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Aggregate Neptun - Disk Space Percentage - |query_dskDevice|" \
--rigid \
--base=1024 \
--height=120 \
--width=700 \
--upper-limit=100 \
--lower-limit=0 \
--y-grid=20:1 \
--vertical-label="percentage" \
--slope-mode \
DEF:a="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_percentage:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_total:AVERAGE \
DEF:c="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_free:AVERAGE \
DEF:d="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_used:AVERAGE \
DEF:e="/usr/share/cacti/site/rra/neptun_hdd_free_41.rrd":hdd_percentage:AVERAGE \
DEF:f="/usr/share/cacti/site/rra/neptun_hdd_free_41.rrd":hdd_total:AVERAGE \
DEF:g="/usr/share/cacti/site/rra/neptun_hdd_free_41.rrd":hdd_free:AVERAGE \
DEF:h="/usr/share/cacti/site/rra/neptun_hdd_free_41.rrd":hdd_used:AVERAGE \
DEF:i="/usr/share/cacti/site/rra/neptun_hdd_free_42.rrd":hdd_percentage:AVERAGE \
DEF:j="/usr/share/cacti/site/rra/neptun_hdd_free_42.rrd":hdd_total:AVERAGE \
DEF:ba="/usr/share/cacti/site/rra/neptun_hdd_free_42.rrd":hdd_free:AVERAGE \
DEF:bb="/usr/share/cacti/site/rra/neptun_hdd_free_42.rrd":hdd_used:AVERAGE \
DEF:bc="/usr/share/cacti/site/rra/neptun_hdd_free_43.rrd":hdd_percentage:AVERAGE \
DEF:bd="/usr/share/cacti/site/rra/neptun_hdd_free_43.rrd":hdd_total:AVERAGE \
DEF:be="/usr/share/cacti/site/rra/neptun_hdd_free_43.rrd":hdd_free:AVERAGE \
DEF:bf="/usr/share/cacti/site/rra/neptun_hdd_free_43.rrd":hdd_used:AVERAGE \
CDEF:cdefb=b,1024,* \
CDEF:cdefc=c,1024,* \
CDEF:cdefd=d,1024,* \
CDEF:cdefba=f,1024,* \
CDEF:cdefbb=g,1024,* \
CDEF:cdefbc=h,1024,* \
CDEF:cdefbj=j,1024,* \
CDEF:cdefca=ba,1024,* \
CDEF:cdefcb=bb,1024,* \
CDEF:cdefci=bd,1024,* \
CDEF:cdefcj=be,1024,* \
CDEF:cdefda=bf,1024,* \
LINE3:a#004359:"127.0.0.1 / (/dev/hda1)\:\n"  \
GPRINT:cdefb:LAST:"                        Total\: %5.1lf%s"  \
GPRINT:cdefc:LAST:"                        Free\: %5.1lf%s"  \
GPRINT:cdefd:LAST:"                        Used\: %5.1lf%s"  \
GPRINT:a:LAST:"                        %%\: %5.1lf%s"  \
GPRINT:cdefd:MIN:"                        Min\: %5.1lf%s"  \
GPRINT:a:MIN:"%%\: %5.1lf%s"  \
GPRINT:cdefd:MAX:"Max\: %5.1lf%s"  \
GPRINT:a:MAX:"%%\: %5.1lf%s\n"  \
LINE3:e#005D57:"127.0.0.1 /home (/dev/mapper/server--disc-home)\:\n"  \
GPRINT:cdefba:LAST:"Total\: %5.1lf%s"  \
GPRINT:cdefbb:LAST:"Free\: %5.1lf%s"  \
GPRINT:cdefbc:LAST:"Used\: %5.1lf%s"  \
GPRINT:e:LAST:"%%\: %5.1lf%s"  \
GPRINT:cdefbc:MIN:"Min\: %5.1lf%s"  \
GPRINT:e:MIN:"%%\: %5.1lf%s"  \
GPRINT:cdefbc:MAX:"Max\: %5.1lf%s"  \
GPRINT:e:MAX:"%%\: %5.1lf%s\n"  \
LINE3:i#00694A:"127.0.0.1 /usr (/dev/mapper/server--disc-usr)\:\n"  \
GPRINT:cdefbj:LAST:"  Total\: %5.1lf%s"  \
GPRINT:cdefca:LAST:"  Free\: %5.1lf%s"  \
GPRINT:cdefcb:LAST:"  Used\: %5.1lf%s"  \
GPRINT:i:LAST:"  %%\: %5.1lf%s"  \
GPRINT:cdefcb:MIN:"  Min\: %5.1lf%s"  \
GPRINT:i:MIN:"%%\: %5.1lf%s"  \
GPRINT:cdefcb:MAX:"Max\: %5.1lf%s"  \
GPRINT:i:MAX:"%%\: %5.1lf%s\n"  \
LINE3:bc#157419:"/var (/dev/mapper/server--disc-var)\:\n"  \
GPRINT:cdefci:LAST:"            Total\: %5.1lf%s"  \
GPRINT:cdefcj:LAST:"            Free\: %5.1lf%s"  \
GPRINT:cdefda:LAST:"            Used\: %5.1lf%s"  \
GPRINT:bc:LAST:"            %%\: %5.1lf%s"  \
GPRINT:cdefda:MIN:"            Min\: %5.1lf%s"  \
GPRINT:bc:MIN:"%%\: %5.1lf%s"  \
GPRINT:cdefda:MAX:"Max\: %5.1lf%s"  \
GPRINT:bc:MAX:"%%\: %5.1lf%s\n"

Can anyone tell me what I shall do?

Why in rrdtool appears spaces before total, free, etc...

Sorry for my english.

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

Post by gandalf »

I assume the last LEGEND entry of the basic Graph Template misses the <HR checkbox set. For those cases, I've provided the <HR> column in the AGGREGATE creation procedure. See attached image
Reinhard
Attachments
Please pay attention to the &amp;lt;HR&amp;gt; column!
Please pay attention to the &lt;HR&gt; column!
Bildschirmfoto.png (23.07 KiB) Viewed 8126 times
User avatar
majherek
Posts: 2
Joined: Wed Aug 01, 2007 11:59 am
Location: Warsaw, Poland

Post by majherek »

Hi,

I checked <HR>.

Image

The problem is in:

Code: Select all

GPRINT:cdefb:LAST:"                        Total\: %5.1lf%s"  \
GPRINT:cdefc:LAST:"                        Free\: %5.1lf%s"  \
GPRINT:cdefd:LAST:"                        Used\: %5.1lf%s"  \
GPRINT:a:LAST:"                        %%\: %5.1lf%s"  \
GPRINT:cdefd:MIN:"                        Min\: %5.1lf%s"  \ 
There is a lot of space before each first word.

The is no problem with single image.

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-300 \
--title="Neptun - Disk Space Percentage - /dev/hda1" \
--rigid \
--base=1024 \
--height=120 \
--width=700 \
--upper-limit=100 \
--lower-limit=0 \
--y-grid=20:1 \
--vertical-label="percentage" \
--slope-mode \
DEF:a="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_percentage:AVERAGE \
DEF:b="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_total:AVERAGE \
DEF:c="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_free:AVERAGE \
DEF:d="/usr/share/cacti/site/rra/neptun_hdd_free_40.rrd":hdd_used:AVERAGE \
CDEF:cdefb=b,1024,* \
CDEF:cdefc=c,1024,* \
CDEF:cdefd=d,1024,* \
LINE3:a#F51D30:"/ (/dev/hda1)\:\n"  \
GPRINT:cdefb:LAST:"Total\: %5.1lf%s"  \
GPRINT:cdefc:LAST:"Free\: %5.1lf%s"  \
GPRINT:cdefd:LAST:"Used\: %5.1lf%s"  \
GPRINT:a:LAST:"%%\: %5.1lf%s"  \
GPRINT:cdefd:MIN:"Min\: %5.1lf%s"  \
GPRINT:a:MIN:"%%\: %5.1lf%s"  \
GPRINT:cdefd:MAX:"Max\: %5.1lf%s"  \
GPRINT:a:MAX:"%%\: %5.1lf%s\n" 
See image:

Image



BR,
majherek
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Post by chadd »

Is there a way to make just a 'total in' 'total out' in the legend instead of each individual interface listed separately? Also, can you have it so that you can have all the 'in' and all the 'out' together in the graph (for area) so it appears like one single interface graph? I could do all that manually after creating the aggregate graph, but I am aggregating 129 interfaces, so it is a lot of work. Would be nice if the plugin allowed you to do that auto magically. Is this possible? Thanks,

-chadd.
chadd
Cacti User
Posts: 382
Joined: Thu Mar 24, 2005 3:53 pm
Location: Ocoee, Florida

Post by chadd »

I am guessing that the answer is no - from reading through all the posts. So, my next question is, what is the easiest way to re-order the graph items? Like I said, with 129 interfaces, there is no way I am ever going to finish re-ordering them to keep all the inbound, and outbounds together. Also, I would have to edit all the gprints to make them stacks. Any help anyone??????
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

chadd wrote:Is there a way to make just a 'total in' 'total out' in the legend instead of each individual interface listed separately?
Sure. Use the Skip checkboxes to skip unwanted GPRINTs
Also, can you have it so that you can have all the 'in' and all the 'out' together in the graph (for area) so it appears like one single interface graph?
Not yet. Currently, it is the second issue of the most-wanted-features. But you know, time is rare ...
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

gandalf wrote:
chadd wrote:Is there a way to make just a 'total in' 'total out' in the legend instead of each individual interface listed separately?
Sure. Use the Skip checkboxes to skip unwanted GPRINTs
Also, can you have it so that you can have all the 'in' and all the 'out' together in the graph (for area) so it appears like one single interface graph?
Not yet. Currently, it is the second issue of the most-wanted-features. But you know, time is rare ...
Work for 0.8.6k is currently eating up my spare time
Reinhard
jrothlisberger
Posts: 22
Joined: Tue Jul 31, 2007 8:50 am
Location: chicago,il
Contact:

Same error posted above but no responce

Post by jrothlisberger »

Cacti 0.8.6j
Plugin Arch 1.1
Aggregate 0.63

When I select "yes" at create aggregate graph I get:
PROGERR: ERRNO:'2048' TYPE:'' MESSAGE:'Assigning the return value of new by reference is deprecated' IN FILE:'/usr/share/cacti/lib/adodb/adodb-lib.inc.php' LINE NO:'537'

I have been searching for a solution and haven't found anything yet.

I tried to patch the graphs.php file with the patch file included but it always fails on the 3rd hunk.
patch
patching file graphs.php
Hunk #1 succeeded at 49 with fuzz 2 (offset 2 lines).
Hunk #2 succeeded at 239 with fuzz 2 (offset -123 lines).
Hunk #3 FAILED at 381.
1 out of 3 hunks FAILED -- saving rejects to file graphs.php.rej

And the rej file includes:
***************
*** 376,381 ****
</td>
</tr>\n
";
}

if (!isset($graph_array)) {
--- 381,391 ----
</td>
</tr>\n
";
+ }else {
+ $save["drp_action"] = $_POST["drp_action"];
+ $save["graph_list"] = $graph_list;
+ $save["graph_array"] = $graph_array;
+ do_hook_function("graphs_action_prepare", $save);
}

if (!isset($graph_array)) {



Any ideas?

Thanks,
John
StephenKing
Posts: 1
Joined: Sat Sep 08, 2007 5:59 am

Post by StephenKing »

I think you should change setup.php Line 702

Code: Select all

        $sql    = "show tables from " . $database_default;
to

Code: Select all

        $sql    = "show tables from `" . $database_default. "`";
to avoid problems with database names that require to be escaped (e.g. containing "-").
User avatar
TheWitness
Developer
Posts: 17007
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Gandolf,

I have reviewed the Aggregate plugin and am very happy with it. However, I need four features. I will write three, if you are ok with that, and then the last is a wish list item. :)

1) Ability to have the Legend prefixed with the |query_XXX| from the Graph Title Optionally rather than the Legend text from the source graph's legend.

This is applicable when you have multiple graphs with the same name legend for each and the distinguishing information about the item is in the title's query_* field and the hostname has no relevance.

2) Ability to use Host Description as a Prefix in the Legend instead of Hostname.

For this I see a dropdown with the following options: None, Hostname, Description, and possible a "do_hook" function :).

3) When you hit save, goto the Graph in Debug Mode to save me fiddling with the Filters to go find it.

4) Allow altering the Graph In place using the Wizard (That's the wish list item).

Larry
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?
Locked

Who is online

Users browsing this forum: No registered users and 0 guests