i've been testing imgproxy, to handle our image serving needs, and it looks good. our existing servers are php based, and we sign and encode our urls for images. To test out imgproxy , I wanted to simply drop it in as a replacement for our servers by sending a % of traffic. There are many ways to do this, varnish was one, with custom code, but nginx is our go-to web server, so I had to find a way to have nginx sit in front of imgproxy and rewrite the decoded url. I settled on using njs, the cut down version of javascript that plugs into nginx as a loadable module. Then use proxy_pass to pass the uri to javascript that will return the imgproxy compatable url, and proxy to it. a sample url would be http://foo.bar/images/c2lnbmF0dXJlZm9vaHR0cDovL3MzLWV1LXdlc3QtMS5hbWF6b25hd3MuY29tL215YnVja2V0b2ZwaG90b3MvcGhvdG9fb2ZfYV9jYXQ1fHx8MTIwMHgxMjAwfHx8fHx8fHw==.jpeg it has a sig, a bucket url, and parameters like image size. Getting nginx setup nginx.conf load_module modu...
Comments
How are you doing to automatically feed google document with you data to create this up to date graph?
Thanks,
JM
i use rrdtool to store my data with rrdcollect. i have a 5 min cron job that runs rrdexport to give 5 min interval data for 2 weeks of my solar to a csv.
my google spreadsheet uses the importdata function to pull in the csv via http. this sheet is then the source for the graph gadget.
everytime the graph is drawn, it pulls from the sheet, which polls from my csv. there is some caching of data in the gadget and the sheet so it's not polling my csv everytime. i'm not sure what the caching is yet, but its built into the sheet. not configured by me.
i not there is now a pachube app using the google viz api, so it should be possible to do it that way also.
i did try a sheet using pachube as a source, but found it unreliable
Thanks for your reply. I still have some troubles to reproduce the graphique with my own data.
I'm fine with the rrd capture and the rrd xport.
I tried to convert the XML to CSV using xml2 and 2csv with no success, so I'm now using cat, grep and replace instead.
My CSV is here: https://ssl.spaggiari.org/export.csv
Then I'm able to upload it to Google Docs through my http server, and I'm also able to generate the gadget. I'm then able to publish the gadget to an HTML page (at the bottom of https://ssl.spaggiari.org/eau.html) but...
How do you put your CSV file into Google Doc with a script? Because with what I did, everything is static. Even if the xport is on the cron. Can you share some hints for the "automatic upload" to google docs?
Thanks,
JM
use rrdfetch, it's easier
rrdtool fetch -s -100h /tmp/RESOL.rrd AVERAGE | grep "^1" | tr " " "," | tr ":" "," | cut -d"," -f1,3-6 > /tmp/solartemps.csv
makes a neat csv that i serve using mini_httpd
then my sheat has a first line of
time,collector,bottomhwc,tophwc,return
in cells a1-a5
then in b1 this formula, =arrayformula({ImportData("http://my.home.com:21171/solartemps.csv")} / {86400,1,1,1,1} + {25569,0,0,0,0})
this formula will fill the columns and make sense of the date format. I then format col. A as time 2009/4/4 10:55:55 , type format
and lastly i make an entry in a1301 so that the range a1:e1300 is always valid as a source range for the graph.
i hope this makes sense and will help :)
I was not aware of the import formula.
However, I tried your formula and I get an error. Seems that I don't have the "arrayformula" formula.
What this formula is supposed to do? Is it supposed to adjust the timespamp? Can it be because I don't have enought values yet?
Thanks,
JM
{86400,1,1,1,1} is beause you have 5 column. But so far I have only 1 for my tests. To I removed some and it's now working fine!
thanks a lot for your help!
JM
Is the graphic still working for you? I'm not able to see it anymore since the last 2 days.
Also, with google gadget, seems that you can have your http file as the graphic source without going through Google Docs, but you will have to update the file content to have the right date format.
JM
http://tbaoebshgeq225lhq2bam0m0a5mf6u0b.open.gmodules.com/ig/creator?synd=open&url=http://www.google.com/ig/modules/time-series-line.xml&lang=en
Maybe google desktop is down? But I will be surprised.
I checked the logs, and it'S querying the file correctly. But tt's not rendering it...
JM
http://sites.google.com/site/myhomeeco/dashboard
http://sites.google.com/a/spaggiari.org/dashboard/
I tried with an HTTP source for the data with no sucess.
I added
awk '{gsub(/nan/,"0");print}'
to my command line, to swap it to a zero