Requested: company logo in background of graph.

Anything that you think should be in Cacti.

Moderators: Developers, Moderators

Post Reply
christiaan
Posts: 10
Joined: Mon Jul 28, 2003 3:37 am
Location: The Netherlands

Requested: company logo in background of graph.

Post by christiaan »

Is it posible to have a (small) picture in a corner of the graph? i like to put the company logo in.
User avatar
bulek
Cacti Pro User
Posts: 854
Joined: Mon May 20, 2002 2:07 am
Location: Poland
Contact:

Post by bulek »

In theory rrdtool is able to add some bitmap to your graph as a background or overlay (-B and -O options). However I couldn't get it working (acceptable bitmap formats are only .gd files). If you are willing to try and you succeed let me know please. To have it working in cacti you would need to add proper rrdtool command option in "rrdtool_function_graph" function (it is in "lib/rrd.php" file).

- Piotr
Phantomdefeater
Posts: 1
Joined: Sun May 28, 2006 1:25 pm

Post by Phantomdefeater »

Someone has got this working yet?
User avatar
BSOD2600
Cacti Moderator
Posts: 12171
Joined: Sat May 08, 2004 12:44 pm
Location: USA

Post by BSOD2600 »

Nope, but if you made a working patch I bet they would incorporate it.
ServerTweak
Posts: 24
Joined: Sun Apr 02, 2006 7:00 pm

Re: Requested: company logo in background of graph.

Post by ServerTweak »

christiaan wrote:Is it posible to have a (small) picture in a corner of the graph? i like to put the company logo in.
humm, i like to see this as well
User avatar
TheWitness
Developer
Posts: 17062
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Post by TheWitness »

Please note that the -B and -O do not function in RRDtool 1.2.x as described above in this 2.5 year old post. The only option available in 1.2.x is the -W option that places a text watermark on the bottom of the graph centered.

Certain customizations could be made to incorporate a background image, but it would have to come from Tobi.

TheWitness
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?
cronopio
Posts: 1
Joined: Mon Jun 09, 2008 7:01 pm

RE:

Post by cronopio »

Hi All!!

I'm trying to add a watermark image as background of the graphic, but I still have problems.

I study the code and the data dump by RRDTool is not compatible with data received by PHP-GD.

Someone has been working on this? or someone give me more info about this topic. Or I totally fucking because that depends on rrdtool?

Excuse my English but i speak spanish and y try to translate with Google.

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

Post by gandalf »

It depends on rrdtool, yes. The required option is currently not supported by cacti. Create a feature request for this
Reinhard
User avatar
sneakymonkey
Posts: 10
Joined: Tue Jan 22, 2008 1:59 pm
Location: Birmingham, UK

watermark on all graphs?

Post by sneakymonkey »

Hi,

i'm interested in watermarking all my graphs with the --watermark string attribute but wondered which file i could edit so that it will default this on all generated graphs. i guess im looking at something in \lib\ rrd.php maybe?

any help or direction?
thanks.
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, that would be the file to be touching.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
User avatar
sneakymonkey
Posts: 10
Joined: Tue Jan 22, 2008 1:59 pm
Location: Birmingham, UK

Post by sneakymonkey »

gandalf wrote:It depends on rrdtool, yes. The required option is currently not supported by cacti. Create a feature request for this
Reinhard
would this mean that it will be apart of the new 0.8.7c release?
User avatar
sneakymonkey
Posts: 10
Joined: Tue Jan 22, 2008 1:59 pm
Location: Birmingham, UK

Post by sneakymonkey »

..cacti/lib/rrd.php (round line ~730)

Code: Select all

/* basic graph options */
	$graph_opts .=
		"--imgformat=" . $image_types{$graph["image_format_id"]} . RRD_NL .
		"--start=$graph_start" . RRD_NL .
		"--end=$graph_end" . RRD_NL .
		"--title=\"" . str_replace("\"", "\\\"", $graph["title_cache"]) . "\"" . RRD_NL .
		"$rigid" .
		"--base=" . $graph["base_value"] . RRD_NL .
		"--height=$graph_height" . RRD_NL .
		"--watermark=COMPANYNAME" . RRD_NL .
		"--width=$graph_width" . RRD_NL .
		"$scale" .
		"$unit_value" .
		"$unit_exponent_value" .
		"$graph_legend" .
		"--vertical-label=\"" . $graph["vertical_label"] . "\"" . RRD_NL;
this worked perfectly placing the watermark text on all graphs like stated in the rrdtool reference guide.
[-W|--watermark string]
Adds the given string as a watermark, horizontally centred, at the bottom of the graph.
i wonder if there is a way to easily set the postion/add bold/different font etc... to the watermark only?
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests