This thread might help.

https://www.mail-archive.com/smokeping-users%40lists.oetiker.ch/msg04777.html 

-Greg


That’s actually exactly what I’m trying to avoid. ;)  
The keyword is automation.  I need to script this so that I can present static, 
7 day graphs to people outside my dept – without having to spend time manually 
taking screenshots of each graph.

— Daniel Crandall
Savant - DevOps


From: Douglas Spindler <[email protected]>
Date: Wednesday, March 23, 2016 at 11:09 AM
To: Daniel Crandall <[email protected]>, 
"[email protected]" <[email protected]>
Subject: RE: [smokeping-users] Automatically download fresh .png snapshot.

Can’t you just take a screenshot? 
 
From: smokeping-users 
[mailto:[email protected]] On 
Behalf Of Daniel Crandall
Sent: Wednesday, March 23, 2016 10:32 AM
To: [email protected]
Subject: [smokeping-users] Automatically download fresh .png snapshot.
 
Hi,
 
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:
 
1)  Download the png using wget
 
I learned about setting the displaymode=a and adjusting the start and end URL 
chunks to get a URL like this:
https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd
 
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:
 `wget -nd -r -l 5 -A png 
https://smokeping.oursite.com/smokeping/smokeping.cgi?displaymode=a;start=now-7day;end=now;target=OurServers.HTTPSLatency.prd`
 
 
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.
 
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.  
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.
 
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.
 
Thanks!
 
— Daniel Crandall
Savant - DevOps
 
_______________________________________________
smokeping-users mailing list
[email protected]
https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

Reply via email to