rrdtool-1.x icon indicating copy to clipboard operation
rrdtool-1.x copied to clipboard

rrdcgi not working after upgrade from 1.6.0 -> 1.7.0

Open hildeb opened this issue 6 years ago • 1 comments

With no changes, my rrdcgi scripts won't work after an upgrade from 1.6.0 -> 1.7.0

#!/bin/sh
graph=cache
rrdsource() {
cat <<__HEADER__
<RRD:GOODFOR 60>
<HTML>
<HEAD><TITLE><RRD::GETENV SERVER_NAME> ${graph} statistics <RRD::TIME::NOW '%Y-%m-%d %H:%M'></TITLE></HEAD>
<META HTTP-EQUIV=REFRESH CONTENT="60">
<BODY>
<H1><RRD::GETENV SERVER_NAME> ${graph} statistics</H1>
<P>


__HEADER__

for range in 1d 2d 1w 30d 365d 10y; do
    echo "<RRD::SETVAR range '-${range}'>"
    echo "<RRD::SETVAR id '${range}'>"
    echo "<RRD::SETVAR img '<IMG SRC=\"graphs/%s\" WIDTH=\"%lu\" HEIGHT=\"%lu\"></A>'>"
    cat template/${graph}.tmpl
done


cat <<__FOOTER__
<!--
gauge	cacheIcpQuerySvcTime.5		# ICP query service time
gauge	cacheIcpReplySvcTime.5		# ICP reply service time
-->

</P>
<HR>
<P>Generated <RRD::TIME::NOW '%Y-%m-%d %H:%M'>
</BODY>
</HTML>
__FOOTER__
}

exec 4<&0

rrdsource | rrdcgi /dev/fd/3 "$@" 3<&0 <&4

hildeb avatar Jun 15 '18 09:06 hildeb

2018/06/15 11:24:43 [error] 36543#36543: *28159 upstream prematurely closed FastCGI stdout while reading response header from upstream, client: 141.42.231.251, server: , request: "GET /statistics/incoming.rrd HTTP/1.1", upstream: "fastcgi://unix:/var/run/fcgiwrap.socket:", host: "proxy-cvk-1.charite.de"

hildeb avatar Jun 15 '18 09:06 hildeb