change the default graph type from png to jpg

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

change the default graph type from png to jpg

Post by viper99 »

Is there a way to change the default behavior of Cacti to make the graphs jpg's instead of png's?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

See each Graph Template, settings for Image Format
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

Sorry but I am not sure I understand what you mean. can you explain a little more?
lvm wrote:See each Graph Template, settings for Image Format
Reinhard
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please login as admin. See entry Graph Templates in the menu bar at the left, select it. See the list of all Graph Templates. Select those Templates, you want to change, one by one. Having selected a template, please change the Image Format (one of the items on the lower half of the screen)
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:Please login as admin. See entry Graph Templates in the menu bar at the left, select it. See the list of all Graph Templates. Select those Templates, you want to change, one by one. Having selected a template, please change the Image Format (one of the items on the lower half of the screen)
Reinhard
ok thanks. I don't know how I missed that earlier..will that take affect on all existing data or will I have to modify my existing data to get them in gif format?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Instand change, that. As each graph gets generated on the fly. That's what templates are for, eh :wink:
Reinhard
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

FYI, only gif and png are supported. I'm not even sure RRDTool supports jpg.
[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
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Oops, sorry for that. Please find from man rrdgraph

Code: Select all

           [-a│--imgformat PNG│SVG│EPS│PDF]

           Image format for the generated graph. For the vector formats you can choose among the standard Postscript fonts
           Courier-Bold, Courier-BoldOblique, Courier-Oblique, Courier, Helvetica-Bold, Helvetica-BoldOblique, Hel-
           vetica-Oblique, Helvetica, Symbol, Times-Bold, Times-BoldItalic, Times-Italic, Times-Roman, and ZapfDingbats.
Conclusion: sorry, no jpg here.
BTB: even GIF is not reported here (rrdtool 1.2.13 running)
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:Instand change, that. As each graph gets generated on the fly. That's what templates are for, eh :wink:
Reinhard
After changing the graphs to gif I now have no graphs in my system. They all show up as a red x. Any ideas on that?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, rrdtool you have installed does not have gif support. Honestly not a big surprize.
[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
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Please post your rrdtool's version. Then, select the red x, then the wrench and post the whole rrdtool graph statement. And please read my last post above (sorry for that, again)
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:Please post your rrdtool's version. Then, select the red x, then the wrench and post the whole rrdtool graph statement. And please read my last post above (sorry for that, again)
Reinhard
No problem. Here is the information you requested.

RRDtool 1.2.11



/usr/bin/rrdtool graph - \
--imgformat=GIF \
--start=1161285917 \
--end=1161372317 \
--title="SWX93A.SHE1 - CPU Usage" \
--rigid \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2006/10/19 15\:25\:17 To 2006/10/20 15\:25\:17\c" \
COMMENT:" \n" \
--vertical-label="percent" \
--slope-mode \
DEF:a="/var/www/html/rra/swx93a_she1_5min_cpu_423.rrd":5min_cpu:AVERAGE \
AREA:a#FF0000:"CPU Usage" \
GPRINT:a:LAST:"Current\:%8.0lf" \
GPRINT:a:AVERAGE:"Average\:%8.0lf" \
GPRINT:a:MAX:"Maximum\:%8.0lf\n" \
COMMENT:"\n" \
COMMENT:"Last Updated \: Fri 20 Oct 15\:25\:02 EDT 2006"
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Run that from the command line, what is the error message rrdtool gives you?
[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]
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

rony wrote:Run that from the command line, what is the error message rrdtool gives you?
ERROR: unsupported graphics format 'GIF'
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

viper99 wrote:ERROR: unsupported graphics format 'GIF'
Bingo, looks like you have to use PNG format.
[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]
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests