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

Post by viper99 »

rony wrote:
viper99 wrote:ERROR: unsupported graphics format 'GIF'
Bingo, looks like you have to use PNG format.
Yeah but my email system does not support png files..I wonder is there an RRDTOOl version that supports GIF's?
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

Yes, compile it yourself.
[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 »

viper99 wrote:Yeah but my email system does not support png files..I wonder is there an RRDTOOl version that supports GIF's?
You're surely not running Notes, as we do? What about the other options? They may be added to the code without too much effort. From rrdtool-users mailinglists, it seems there were troubles with libgd licensing and GIF support was remove long ago. Sorry, no rrdtool 1.0.x here, so I can't try whether it was supported there
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:
viper99 wrote:Yeah but my email system does not support png files..I wonder is there an RRDTOOl version that supports GIF's?
You're surely not running Notes, as we do? What about the other options? They may be added to the code without too much effort. From rrdtool-users mailinglists, it seems there were troubles with libgd licensing and GIF support was remove long ago. Sorry, no rrdtool 1.0.x here, so I can't try whether it was supported there
Reinhard
We are running notes unfortunately. What other options are you referring to?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

I referred to the other image-formats of rrdtool graph: SVG│EPS│PDF. Personally, I do not have any experience with this. And to be honest, my point of view is, that this "marvelleous" product should simply support this widely used graphics format. But this may take "some" time.
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:I referred to the other image-formats of rrdtool graph: SVG│EPS│PDF. Personally, I do not have any experience with this. And to be honest, my point of view is, that this "marvelleous" product should simply support this widely used graphics format. But this may take "some" time.
Reinhard

Ok PDF would work except in cacti there is no setting for PDF only PNG and GIF. So how would I go about changing my templates to PDF?
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

rony wrote:Yes, compile it yourself.
In the current 1.2.x version? Is that possible? and if so then how?
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

viper99 wrote:Ok PDF would work except in cacti there is no setting for PDF only PNG and GIF. So how would I go about changing my templates to PDF?
Get the whole rrdtool graph command and put in into some sh script file. modify the "-" to some arbitrary file name, it denominates the output file. Then change the image format from PNG/GIF to PDF and run the script. If it fails = no PDF format present. If it runs, show us the results. Then I'll may try some patch to support other formats with cacti
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:
viper99 wrote:Ok PDF would work except in cacti there is no setting for PDF only PNG and GIF. So how would I go about changing my templates to PDF?
Get the whole rrdtool graph command and put in into some sh script file. modify the "-" to some arbitrary file name, it denominates the output file. Then change the image format from PNG/GIF to PDF and run the script. If it fails = no PDF format present. If it runs, show us the results. Then I'll may try some patch to support other formats with cacti
Reinhard
Not sure I follow. Can you give me an example? I will try to accomplish this but I am not sure exactly what you mean by

Code: Select all

Get the whole rrdtool graph command and put in into some sh script file. modify the "-" to some arbitrary file name, it denominates the output file.
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Get the "rrdtool graph" command e.g. from Graph Management, selecting your graph and swicthing on "Debug Mode". You should see sth like

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1161457323 \
--end=1161543723 \
--title=" router - Traffic - Ethernet0" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2006/10/21 21\:02\:03 To 2006/10/22 21\:02\:03\c" \
COMMENT:"  \n" \
--vertical-label="Bytes" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/bitstream-vera/VeraMoBI.ttf \
--font AXIS:8:/usr/share/fonts/bitstream-vera/Vera.ttf \
--font LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf \
--font UNIT:8:/usr/share/fonts/bitstream-vera/Vera.ttf \
DEF:a="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_incoming:AVERAGE \
DEF:b="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_incoming:MAX \
DEF:c="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_outgoing:AVERAGE \
DEF:d="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_outgoing:MAX \
CDEF:cdeff=c,-1,* \
CDEF:cdefj=d,-1,* \
AREA:a#00FF00:"Incoming"  \
GPRINT:a:LAST:"     Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"  \
LINE1:b#00BF47:"Max\n"  \
AREA:cdeff#0000FF:"Outgoing"  \
GPRINT:c:LAST:"     Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s"  \
LINE1:cdefj#00004D:"Max\n"
Now, put this into some file as said above, but change the first few lines as follows

Code: Select all

/usr/bin/rrdtool graph /tmp/test.pdf \
--imgformat=PDF \
--start=1161457323 \
--end=1161543723 \
--title=" router - Traffic - Ethernet0" \
...
Please execute this command and tell us about the results.
Reinhard

PS: for me, it worked, but complained about some fonts. Your mileage may vary
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

lvm wrote:Get the "rrdtool graph" command e.g. from Graph Management, selecting your graph and swicthing on "Debug Mode". You should see sth like

Code: Select all

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=1161457323 \
--end=1161543723 \
--title=" router - Traffic - Ethernet0" \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit=0 \
COMMENT:"From 2006/10/21 21\:02\:03 To 2006/10/22 21\:02\:03\c" \
COMMENT:"  \n" \
--vertical-label="Bytes" \
--slope-mode \
--font TITLE:10:/usr/share/fonts/bitstream-vera/VeraMoBI.ttf \
--font AXIS:8:/usr/share/fonts/bitstream-vera/Vera.ttf \
--font LEGEND:7:/usr/share/fonts/bitstream-vera/VeraMono.ttf \
--font UNIT:8:/usr/share/fonts/bitstream-vera/Vera.ttf \
DEF:a="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_incoming:AVERAGE \
DEF:b="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_incoming:MAX \
DEF:c="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_outgoing:AVERAGE \
DEF:d="/var/www/html/cacti/rra/router_traffic_incoming_242.rrd":traffic_outgoing:MAX \
CDEF:cdeff=c,-1,* \
CDEF:cdefj=d,-1,* \
AREA:a#00FF00:"Incoming"  \
GPRINT:a:LAST:"     Current\:%8.2lf %s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:b:MAX:"Maximum\:%8.2lf %s"  \
LINE1:b#00BF47:"Max\n"  \
AREA:cdeff#0000FF:"Outgoing"  \
GPRINT:c:LAST:"     Current\:%8.2lf %s"  \
GPRINT:c:AVERAGE:"Average\:%8.2lf %s"  \
GPRINT:d:MAX:"Maximum\:%8.2lf %s"  \
LINE1:cdefj#00004D:"Max\n"
Now, put this into some file as said above, but change the first few lines as follows

Code: Select all

/usr/bin/rrdtool graph /tmp/test.pdf \
--imgformat=PDF \
--start=1161457323 \
--end=1161543723 \
--title=" router - Traffic - Ethernet0" \
...
Please execute this command and tell us about the results.
Reinhard

PS: for me, it worked, but complained about some fonts. Your mileage may vary
Ok I did the above and it worked for but did complain about the following font.
Can't find font '/usr/share/rrdtool/fonts/DejaVuSansMono-Roman.ttf'
586x227

I looked at the resulting PDF and it looks ok. I have attached the results of the PDF output.
Attachments
5mincpu.pdf
(6.04 KiB) Downloaded 166 times
User avatar
gandalf
Developer
Posts: 22383
Joined: Thu Dec 02, 2004 2:46 am
Location: Muenster, Germany
Contact:

Post by gandalf »

Forwarded this to a dev
Reinhard
User avatar
rony
Developer/Forum Admin
Posts: 6022
Joined: Mon Nov 17, 2003 6:35 pm
Location: Michigan, USA
Contact:

Post by rony »

As I said to LVM in email.

The removal of GIF supported format will not occur in 0.8.6. We will not break the minority population running Cacti with rrdtool 1.0.x with GIF support.

As for PDF.... While PDF is cool, how does embedding a PDF like you do an image in a web page work? It doesn't, you have to much overhead and I'm not even sure it will work. While PDF output is cool, you have to ask yourself, what are you really after? You want to email graph/reports over Lotus Notes. I know this pain all to well, Lotus Notes needs some work. But, I would suggest a completely different route. Why not use something like html2pdf converter to create a PDF from the intended graph page and email that instead? Just a thought.

Btw, I have been watching this thread pretty closely. I wanted to see what came of it. But more importantly, I didn't want to inject my opinion to early in the process, mostly because I wanted to see what you two would come up with. :)
[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 »

rony wrote:The removal of GIF supported format will not occur in 0.8.6. We will not break the minority population running Cacti with rrdtool 1.0.x with GIF support.
I agree. There's no need for it. Perhaps, choosing GIF should be checked against the "RRDTool Utility Version". Seems not to be of that importance, as this is the first complaint about it I've seen until now.
As for PDF.... While PDF is cool, how does embedding a PDF like you do an image in a web page work? It doesn't, you have to much overhead and I'm not even sure it will work. While PDF output is cool, you have to ask yourself, what are you really after? You want to email graph/reports over Lotus Notes. I know this pain all to well, Lotus Notes needs some work. But, I would suggest a completely different route. Why not use something like html2pdf converter to create a PDF from the intended graph page and email that instead? Just a thought.
My approach goes the other way round. cacti is an rrdtool frontend and should support as much options as possible (and, of course, meaningful). I won't like to discuss the Notes thingy (it would make me nervous), but rrdtool. So I'd like to make those options available.
Reinhard
viper99
Posts: 38
Joined: Thu Sep 21, 2006 6:22 am

Post by viper99 »

rony wrote:As I said to LVM in email.

The removal of GIF supported format will not occur in 0.8.6. We will not break the minority population running Cacti with rrdtool 1.0.x with GIF support.

As for PDF.... While PDF is cool, how does embedding a PDF like you do an image in a web page work? It doesn't, you have to much overhead and I'm not even sure it will work. While PDF output is cool, you have to ask yourself, what are you really after? You want to email graph/reports over Lotus Notes. I know this pain all to well, Lotus Notes needs some work. But, I would suggest a completely different route. Why not use something like html2pdf converter to create a PDF from the intended graph page and email that instead? Just a thought.

Btw, I have been watching this thread pretty closely. I wanted to see what came of it. But more importantly, I didn't want to inject my opinion to early in the process, mostly because I wanted to see what you two would come up with. :)
understand that you don't like this solution. So here is my overall issue.
I have installed the reports add-on from cactiusers. The plugin works pretty good and I get the reports just fine to non-work email addresses, however this is to be an automated report to be emailed to management once daily in a formation that they can read. In the existing environment they can not read the graphs as they are png and we use notes as our email system. So I was looking to use GIF but is not supported in my version of rrdtool well that left me with PDF. If you know of another way to resolve this issue I am more than happy to listen and see if I can get it working but manually creating the graphs and saving them as PDF is not an option.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests