Package: pnp4nagios-web
Version: 0.6.24+dfsg1-4
Severity: important

Hi

pnp4nagios-web 0.6.24+dfsg1-4 does not work for me.

All browsers shows errors on any images from pnp4nagios

If I try to get image via curl I see

curl -s "http://127.0.0.1/pnp4nagios/image?host=localhost&srv=CPU_utilization&theme=multisite&baseurl=.."%"2Fcheck_mk"%"2F&view=0&source=0&start=1452248124&end=1452262524"; -H "Authorization: Basic xxxxxxxxxxxxxxxxxxxx" |hexdump -C

00000000  0a 0a 0a 0a 0a 89 50 4e  47 0d 0a 1a 0a 00 00 00  |......PNG.......|
00000010  0d 49 48 44 52 00 00 02  55 00 00 00 bb 08 02 00  |.IHDR...U.......|
00000020  00 00 c3 b5 fc 3e 00 00  00 06 62 4b 47 44 00 ff  |.....>....bKGD..|
00000030  00 ff 00 ff a0 bd a7 93  00 00 20 00 49 44 41 54  |.......... .IDAT|
00000040  78 9c ed 9d 79 5c 15 55  ff c7 cf 65 11 2d 40 14  |x...y\.U...e.-@.|
00000050  f0 0a 28 0a 48 2e 2c a6  50 29 8f c5 a2 22 8f a6  |..(.H.,.P)..."..|


I think PNG header is wrong -  see 5 x 0x0a before real PNG

rrdtool generates correct PNG header

echo " graph --daemon=unix:/var/run/rrdcached.sock - --width=500 --height=100 --start 1452248124 --end 1452262524 --vertical-label 'CPU utilization %' -l0 -u 100 --title \"CPU Utilization for localhost\" DEF:user=/var/lib/pnp4nagios/perfdata/localhost/CPU_utilization.rrd:1:AVERAGE DEF:system=/var/lib/pnp4nagios/perfdata/localhost/CPU_utilization.rrd:2:AVERAGE DEF:wait=/var/lib/pnp4nagios/perfdata/localhost/CPU_utilization.rrd:3:AVERAGE CDEF:us=user,system,+ CDEF:sum=us,wait,+ CDEF:idle=100,sum,- COMMENT:Average\\: AREA:system#ff6000:\"System\" GPRINT:system:AVERAGE:\"%4.1lf%% \" AREA:user#60f020:\"User\":STACK GPRINT:user:AVERAGE:\"%4.1lf%% \" AREA:wait#00b0c0:\"Wait\":STACK GPRINT:wait:AVERAGE:\"%4.1lf%% \" LINE:sum#004080:\"Total\" GPRINT:sum:AVERAGE:\"%4.1lf%% \\n\" COMMENT:\"Last\\: \" AREA:system#ff6000:\"System\" GPRINT:system:LAST:\"%4.1lf%% \" AREA:user#60f020:\"User\":STACK GPRINT:user:LAST:\"%4.1lf%% \" AREA:wait#00b0c0:\"Wait\":STACK GPRINT:wait:LAST:\"%4.1lf%% \" LINE:sum#004080:\"Total\" GPRINT:sum:LAST:\"%4.1lf%% \\n\" " |/usr/bin/rrdtool - |hexdump -C |head -n 5

00000000  89 50 4e 47 0d 0a 1a 0a  00 00 00 0d 49 48 44 52  |.PNG........IHDR|
00000010  00 00 02 55 00 00 00 bb  08 02 00 00 00 c3 b5 fc  |...U............|
00000020  3e 00 00 00 06 62 4b 47  44 00 ff 00 ff 00 ff a0  |>....bKGD.......|
00000030  bd a7 93 00 00 20 00 49  44 41 54 78 9c ed 9d 79  |..... .IDATx...y|
00000040  58 14 47 fe ff 6b 40 54  12 86 43 18 c6 01 44 01  |X.G..k@T..C...D.|

So I don't know where pnp4nagios insert this "\n\n\n\n\n\"


PS. I use
libkohana2-php 2.3.4-2
libapache2-mod-php5/php5-cgi 5.6.17+dfsg-1
rrdtool 1.5.5-3+b1


--
With best wishes
Max

Reply via email to