Ticket #480 (closed patch: fixed)

Opened 5 years ago

Last modified 3 months ago

sub calculate_png_size in munin-html is not capable of calculating right width/height for rrdtools 1.2.11

Reported by: rune,skillingstad@ntnu.no Assigned to: janl
Priority: normal Milestone: Munin 1.4
Component: master Version:
Severity: minor Keywords: cgi scale html img tag
Cc:

Description

As I tried to use graph_strategy cgi on my munin server (running SuSE Linux 10.0), I started to notice that the fonts seemed wrong. A closer inspection revealed that the problems was not fonts, but munin-htmls ability to predict cgi-rendered graphs when using rrdtools 1.2.11

I have tried to play with the values to predict correct size, and come up with a patch to fix this with rrdtools 1.2.11.

I have not tested this on other distributions or other versions of rrdtool, but I guess this is due to the ttf font that rrdtool 1.2.x uses.

I would suggest rewriting the whole &calculate_png_size(). An approach that I think might work, would be to check if cached image is on disk, and use existing &get_png_size() on cache, and skip height and weight attributes if there is no file. Most of the time, there will be a cache. The few times there is no such file, I could live with the graph being loaded "strage" without size attributes, if all my graphs would look all right when they were loaded.

Attachments

munin-html.patch (1.6 kB) - added by rune.skillingstad@ntnu.no on 01/08/07 22:57:55.
patch for rrdtools 1.2.11
munin-html-use-cache-img-size-for-cgi.diff (2.7 kB) - added by blueyed on 05/11/08 03:00:46.
Patch to use the image size for existing files also for "cgi". Additionally removes obsolete calculate_png_size function
munin-html.2.patch (0.8 kB) - added by human on 01/15/09 07:28:47.
cgi proper size patch for debian stable (etch)

Change History

01/08/07 22:57:55 changed by rune.skillingstad@ntnu.no

  • attachment munin-html.patch added.

patch for rrdtools 1.2.11

02/12/07 22:49:15 changed by janl

  • owner changed from nobody to janl.
  • status changed from new to assigned.
  • type changed from defect to patch.

09/25/07 22:46:57 changed by janl

  • status changed from assigned to closed.
  • resolution set to fixed.

munin-html no longer generates width/height attributes in cgi mode. (since a while ago)

05/11/08 02:58:30 changed by blueyed

  • status changed from closed to reopened.
  • resolution deleted.

Well, it's still being inserted in 1.2.5 in Debian/Ubuntu, and I can confirm that the patch helped. I had to adjust the height+17 though.

For the other idea, using no width/height by default, but using them from cached files, I can confirm that this works and is quite easy to implement.

I'll attach a patch against SVN trunk. Please consider applying it.

05/11/08 03:00:46 changed by blueyed

  • attachment munin-html-use-cache-img-size-for-cgi.diff added.

Patch to use the image size for existing files also for "cgi". Additionally removes obsolete calculate_png_size function

01/15/09 07:28:19 changed by human

i confirm the later patch works for me under debian stable (although it doesn't apply cleanly) and is very useful to get nice graphs again. otherwise they look terrible.

I'll attach my crappy patch.

01/15/09 07:28:47 changed by human

  • attachment munin-html.2.patch added.

cgi proper size patch for debian stable (etch)

10/21/09 01:28:02 changed by janl

  • version deleted.
  • milestone set to Munin 1.4.

10/28/09 02:26:35 changed by janl

  • status changed from reopened to closed.
  • resolution set to fixed.

Blueyed's patch applied in r2735. Thanks a lot!

10/27/11 11:19:50 changed by glamsenthazen1973

Anyone who loves motion pictures is likely to love movie downloads, too. The actual fact is that this pattern is changing into an enormous one and it is great for individuals who wish to create giant collections with out having to dole out prime dollar or premium home house to do so. How to download video from vimeo are now accessible legally from all kinds of big film studios and even television networks, as well. A video collection created digitally has a number of benefits over regular disk purchases, too. The biggest perks of video downloads involve the storage issues and pricing. But, why? Video downloads are typically a number of dollars or extra lower than a regular DVD purchase as a result of there isn't any packaging issues to contend with. Plus, there's the easy fact delivery isn't a difficulty either. Since the corporations that promote downloads save on delivery and the film studios save on packaging, they will pass on some of these financial savings directly to buyers. In regard to storage, it is a easy truth of space. It's an entire lot simpler to retailer movies on a pc drive or a backup drive than it is to carry one hundred videos in a room. There's no want for shelf after shelf or tons of DVD towers when a group is created via video download. Management of flicks and television downloads generally is a whole lot easier, too. It's pretty simple to create folders on the pc to retailer movies by style and it is a whole lot faster, too. Video downloads are becoming the favorites of many for a reason beyond storage or pricing. This reason is variety. The very fact is the kinds of downloads obtainable can be actually thoughts boggling. Let's take a look at what kinds of video downloads might be discovered legally: Hit films Nearly each new movie that hits the theaters will find yourself in a authorized obtain format shortly after release. This means there's no must run to the video store, or worse, pay high dollar at a theater to see a new release. Tv applications Vimeo tube downloads As the movie studios soar on the bandwagon, so too are the tv studios. Hit shows from all many years might be discovered by the season or by the episode by way of video download.Classics Because the movie obtain business becomes more widespread, many studios are video by their catalogues and offering downloads of their older movies. From the classics of the 1920s to holiday favorites of the Nineteen Eighties, they'll all be found through video download. And, if a title cannot be discovered right now, it is possible it will likely be added quickly as every major film studio falls into place providing downloads through a lot of completely different sites. Video downloads provide their users with an on demand aspect, worth savings and storage subject reduction that regular DVD buys cannot. As this new format turns into an increasing number of accepted, it's changing into the method of alternative for purchasing and watching movies. Unique works There are tons of places to get video downloads from newbie or little identified creators. These movies may not have the financial backing of a few of the main movies in historical past, but that does not imply there is not some good leisure out there. Indie works are getting an entire new audience thanks to video downloads and the Internet.