Hang tight - this isn't working as well as expected! The URL for 24 hours seems to be working OK but the URL for the past 7 days is not. I'm still trying to figure this out. I'll update this post again once I figure it out. If anyone has any ideas in the meantime, I would really appreciate a hand with this!
Instead of reviewing the Cacti documentation, I looked at the documentation for RRDTool:
https://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html
Time range
[-s|--start time] [-e|--end time] [-S|--step seconds]
The start and end of the time series you would like to display, and which RRA the data should come from. Defaults are: 1 day ago until now, with the best possible resolution. Start and end can be specified in several formats, see "AT-STYLE TIME SPECIFICATION" in rrdfetch and rrdgraph_examples. By default, rrdtool graph calculates the width of one pixel in the time domain and tries to get data from an RRA with that resolution. With the step option you can alter this behavior. If you want rrdtool graph to get data at a one-hour resolution from the RRD, set step to 3'600. Note: a step smaller than one pixel will silently be ignored.
For non-image --imgformats see "OUTPUT FORMAT" in rrdxport for details on how this affects the output.
I used the following:
For past 24 hours:
For past 7 days:
If you take the example I provided in my original post:
Code: Select all
<img src="https://mycactiserver.mydomain.com/cacti/graph_image.php?local_graph_id=209&graph_start=1596346200&graph_end=1596432564&graph_width=750&graph_height=240">
Then remove graph_start and graph_end and replace them with end and start (this example is for the past 24 hours = 86400 seconds):
Code: Select all
<img src="https://mycactiserver.mydomain.com/cacti/graph_image.php?local_graph_id=168&end=now&start=end-86400s&graph_width=750&graph_height=240">
That worked perfectly!!!