Graph is not resized properly (height is capped)
B-P-K opened this issue · 7 comments
Expected Behavior
Read height and width from the template and apply it correctly.
Current Behavior
If height and width are passed directly in the url then the graph has the correct size.
But if the arguments are passed as 'urlparams' in the template file, then the height is capped and not applied correctly.
Possible Solution
Graphite itself renders the image correctly; the problem seems to lie in the container surrounding the image.
Steps to Reproduce (for bugs)
Template file with height and width:
[check-eps.graph]
check_command = "check-eps"
[check-eps.metrics_filters]
hoher="$host_name_template$.perfdata.Alarme_mit_hoher_Einstufung.value"
mittler="$host_name_template$.perfdata.Alarme_mit_mittlerer_Einstufung.value"
info="$host_name_template$.perfdata.Informationshinweise.value"
good="$host_name_template$.perfdata.Ohne_Alarme.value"
[check-eps.urlparams]
graphType=pie
valueLabels=number
valueLabelsMin=1
colorList=red,orange,yellow,green
hideLegend=true
height=600
width=600
This produces following output in Icinga:
If the same template is used but without height and width specified, the output is as follows:
Height and width can then be passed directly in the browser via the url:
Context
The graph is simply too small for our purpose.
Your Environment
- Module version (System - About): 2.7.3
- Icinga Web 2 version and modules (System - About):
- Icinga 2 version (icinga2 --version):
icinga2 - The Icinga 2 network monitoring daemon (version: r2.10.4-1)
Copyright (c) 2012-2020 Icinga GmbH (https://icinga.com/)
License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl2.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
System information:
Platform: Ubuntu
Platform version: 18.04.2 LTS (Bionic Beaver)
Kernel: Linux
Kernel version: 4.15.0-65-generic
Architecture: x86_64
Build information:
Compiler: GNU 7.3.0
Build host: b2ecadfb68ab
Application information:
General paths:
Config directory: /etc/icinga2
Data directory: /var/lib/icinga2
Log directory: /var/log/icinga2
Cache directory: /var/cache/icinga2
Spool directory: /var/spool/icinga2
Run directory: /run/icinga2
Old paths (deprecated):
Installation root: /usr
Sysconf directory: /etc
Run directory (base): /run
Local state directory: /var
Internal paths:
Package data directory: /usr/share/icinga2
State path: /var/lib/icinga2/icinga2.state
Modified attributes path: /var/lib/icinga2/modified-attributes.conf
Objects path: /var/cache/icinga2/icinga2.debug
Vars path: /var/cache/icinga2/icinga2.vars
PID path: /run/icinga2/icinga2.pid
- Graphite (carbon, web, whisper) version: 1.1.0
- Operating System and version: Ubuntu Server 18.04
- Webserver, PHP versions: Apache 2 + PHP 7.2
Second this
Hey @B-P-K,
quick question: does this also happen if you only specify height=600
in the template?
@B-P-K thanks for the update!
Better, but still far from optimal.
I'll look into it, but from what I have seen now this might actually be a lot more complicated than one would think...
We have some fancy graphs about cache statistics with about 20 data sources, for this graph it would be cool to be able to set a greater hight via the graph template, we do not want to set the global value greater. So respectiong the setting from the template if bigger than the default would be realy great