Would like to have no data legends on Aggregrate graph

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
jmcdonn1
Posts: 5
Joined: Mon Apr 04, 2011 5:22 am

Would like to have no data legends on Aggregrate graph

Post by jmcdonn1 »

Hello,

I have many many servers for which I would like to create an aggregate cpu usage graph.

I can do this pretty easily with the aggregate plugin. The problem is that it insists on creating a legend for cpu user/system/nice for every server. That's 3 per server and I have a lot of servers.

Selecting "skip" for the gprint lines in the aggregate setup avoids the printing of the data numbers, and setting the prefix to blank removes the server name. However I'm still left with the legend color square and user/system/nice.

The only way I can do what I want is to go into the graph config and edit every graph item to set the name (user/system/nice) to blank and remove the <HR>, which is painful since I have several hundred of these.

Could the solution to this be to apply some kind of graph template to the aggregate graph?

J.
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Would like to have no data legends on Aggregrate graph

Post by noname »

Example as workaround:
(This is not only for aggregate plugin)

(A) Use thumbnail view
As you know, no legends displayed.
If you feel graphs are too small, change default thumbnail size in 'User Management -> (user) -> Graph Settings'.
thumbnail_settings.png
thumbnail_settings.png (10.27 KiB) Viewed 2333 times
(B) Use 'graph_nolegend' implementation of Cacti
When invoking 'graph_view.php', you may add '&graph_nolegend=' in HTTP request so that can skip over drawing legends.
But it is used mainly to create thumbnails or export graphs.

Let's try to add options in 'graph.php' as follows: (tested with Cacti0.8.7g)
102:<table width='1' cellpadding='0'>
103: <tr>
104: <td>
105: <img class='graphimage' id='graph_<?php print $_GET["local_graph_id"] ?>' src='<?php print htmlspecialchars("graph_image.php?action=view&local_graph_id=" . $_GET["local_graph_id"] . "&rra_id=" . $rra["id"] . (isset($_GET["graph_nolegend"]) ? "&graph_nolegend=" . $_GET["graph_nolegend"] : ""));?>' border='0' alt='<?php print htmlspecialchars($graph_title);?>'>
106: </td>
107: <td valign='top' style='padding: 3px;' class='noprint'>
Graph without legends
Graph without legends
graph_nolegend.png (72.63 KiB) Viewed 2333 times
Then you can see graph details without legends.

But if Cacti had toggle option such like 'Draw Legends' (on/off) in graph template settings, we (I?) will be happy... :)
garyfarm
Posts: 4
Joined: Sun Aug 25, 2013 2:10 am

Re: Would like to have no data legends on Aggregrate graph

Post by garyfarm »

Thank you so much for the explanation. I have lots of "groups" of ports that I do aggregate graphs and I do not need the legends taking up space for what I need it for.

Thanks again !
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests