<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72"><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>Can’t you just take a screenshot? <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span style='font-size:11.0pt;font-family:"Calibri",sans-serif'> smokeping-users [mailto:smokeping-users-bounces+doug.spindler=gmail.com@lists.oetiker.ch] <b>On Behalf Of </b>Daniel Crandall<br><b>Sent:</b> Wednesday, March 23, 2016 10:32 AM<br><b>To:</b> smokeping-users@lists.oetiker.ch<br><b>Subject:</b> [smokeping-users] Automatically download fresh .png snapshot.<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>Hi,<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>I need to automatically download .png of 7 day snapshots of certain smokeping graphs to send to a group of concerned parties. I’ve tried two techniques without success:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>1) Download the png using wget<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>I learned about setting the displaymode=a and adjusting the start and end URL chunks to get a URL like this:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><a href="https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd">https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd</a><o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>This URL gives me a single graph with the snapshot interval I need. But I can’t figure out how to download the actual graph png. It’s weird because if I put the URL in a browser, right click on the graph and save it manually, it saves a file called smokeping.png that is the correct graph. But when I try to do the same using wget like this:<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'> `wget -nd -r -l 5 -A png <a href="https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd%60">https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd`</a> <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>It downloads smokeping.png – but instead of it being a graph, this version is simply the smokeping logo. It also downloads the RRD logo, but no other png files.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>2) Using rrdtool on the rrd files themselves to generate a png of the snapshot I’m looking for on my smokeping server, and then copying it to the web server dir where I can then download it using wget. <o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>Unfortunately I haven’t been able to figure out the correct rrd parameters and DEF, CDEF, AREA..etc. settings to actually generate a smokeping graph.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>If anyone can point me in the right direction with either of the above methods – or share another technique to achieve the same goal, I would be very grateful.<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>Thanks!<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div><div><div id="MAC_OUTLOOK_SIGNATURE"><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>— Daniel Crandall<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'>Savant - DevOps<o:p></o:p></span></p></div><div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><o:p> </o:p></span></p></div></div></div><p class=MsoNormal><span style='font-size:10.5pt;font-family:"Calibri",sans-serif;color:black'><br><br>Statement of Confidentiality <br>The contents of this e-mail message and any attachments are confidential and are intended solely for the addressee. The information may also be legally privileged. This transmission is sent in trust, and the sole purpose of delivery to the intended recipient. If you have received this transmission in error, any use, reproduction or dissemination of this transmission is strictly prohibited. If you are not the intended recipient, please immediately notify the sender by reply e-mail or at 508.683.2500 and delete this message and its attachments, if any. <o:p></o:p></span></p></div></body></html>