[rrd-users] url for single graph (remove side bar and other graphs)

Simon Hobson linux at thehobsons.co.uk
Sun Jul 1 12:37:37 CEST 2012


souc3 Codes wrote:

>Wondering if it is possible to display only one graph instead of the 
>whole web interface ( remove the side bar and other graphs on the 
>page) as i would like to include the graph on part of the main site?

That is entirely down to how you code your site.
RRD Tools don't create any web pages, that is down to whatever other 
tools or home-grown stuff you use. If using RRD Graph, then there are 
two main ways of using it :

1) You can use it in CGI mode where you pipe your web page through 
it, it detects RRD commands, and replaces them with an image URL.
http://oss.oetiker.ch/rrdtool/doc/rrdcgi.en.html
If you use this mode, then you need to load the whole page - 
otherwise the RRD CGI isn't executed and the image file won't be 
updated. Ie you can load the image on it's own, but it will only show 
the graph from last time the CGI was run.

2) You can embed image urls in your page, and make those URLs refer 
to a CGI program.
This is how I do my graphs at work, the image URL calls a CGI script 
which generates a graph definition, calls RRD Tools to process it, 
and then sends the resulting image.
With this mode, you can use a single graph definition in multiple 
pages, or even load it on it's own. The act of doing an HTTP GET on 
the image URL results in RRD Tools being called to generate (or 
update) the image before it is sent.


Another method is to use "static" images which you refer to with IMG 
URLs in your web pages. You then periodically run jobs to 
generate/update these images as a background process.
The big upside of this method is that the images load quickly and 
your web pages are fast and responsive (vs the other techniques where 
you have to wait for the images to be generated). The downside is 
that you run a load on your system all the time by creating/updating 
graphs that will never be looked at.


So you need to look at how your graphs are being generated and see


>http://xxx.xxx.xxx.xxx/cgi-bin/smokeping.cgi?target=Equipment.TEST01

Err, it's no good posting a link that you've removed the address from !

Ahh, having types all that above, I now notice you are using 
SmokePing - that's a different project to RRD.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the rrd-users mailing list