OK, sometimes I pay attention.... That's not what you asked for.
Seems like you should be able to modify a _text_ report definition to default
to showing all entries. It'll take some playing with that TALES code.
Did you try changing the default page size under the user that's running the
reports? (Settings | Users | Edit | Default Page Size) That seems to work to
get more data displayed in the report. Wget could then pull the page correctly
once that's fixed.
Code:
#!/usr/bin/sh
WEBSRV=/srv/www/htdocs
WEBDIR=zenoss-status
MYTEMP=/tmp
#The graph names will change every time we run the script
#...so we'd better clear out all the old graphs.
rm $WEBSRV/$WEBDIR/*.png
#retrieve the base web page with any auxiliary (css, etc.) files
#...but the actual GRAPHS we want will fail to be saved!
/path/to/wget --user=<yourZenUser> --password=<yourZenPwd> --no-proxy
-o$MYTEMP/zen-page-log.txt -nd -P$WEBSRV/$WEBDIR -NrEkp
http://<your.zen.host>:8080/zport/dmd/Reports/Multi-Graph%20Reports/<forExample>/Webserver%20Utilization/viewMultiGraphReportClean
#Parse the log file from WGET to pick out the graph URL's (url => JUNKNAME)
grep 'http://<your.zen.host>:8080/zport/RenderServer/render'
$MYTEMP/zen-page-log.txt | sed 's/^.*http/http/' |
while read JUNKNAME
do
#We will mangle the URL into a unique shorter name to be saved locally (local
file => NEWNAME)
NEWNAME=`echo $JUNKNAME | md5sum | cut -c-32 | sed 's/$/.png/'`
/path/to/wget --user=<yourZenUser> --password=<yourZenPwd>
--no-proxy -a$MYTEMP/zen-page-log.txt -nd -P$WEBSRV/$WEBDIR
-O$WEBSRV/$WEBDIR/$NEWNAME -Ekp $JUNKNAME
#Next we have to pick out the old graph URL from the WGET web page copy, so we
can replace it.
#...all the graphs start with src="render, so find that line and replace with
the new image file name.
LINENUM=`grep -n -o -m1 'src="render'
$WEBSRV/$WEBDIR/viewMultiGraphReportClean.html | cut -d: -f1`
# echo "replacing line number $LINENUM "
sed "$LINENUM s...@src=\"render.* \/>@src=$NEWNAME \/>@"
$WEBSRV/$WEBDIR/viewMultiGraphReportClean.html >
$WEBSRV/$WEBDIR/viewMultiGraphReportClean.html.tmp
mv $WEBSRV/$WEBDIR/viewMultiGraphReportClean.html.tmp
$WEBSRV/$WEBDIR/viewMultiGraphReportClean.html
done
mv $WEBSRV/$WEBDIR/viewMultiGraphReportClean.html $WEBSRV/$WEBDIR/index.html
Hope it's useful.
--Jay
-------------------- m2f --------------------
Read this topic online here:
http://forums.zenoss.com/viewtopic.php?p=32418#32418
-------------------- m2f --------------------
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users