Xymon Mailing List Archive search

Can I create a graph as an HTML image?

4 messages in this thread

list John Horne · Wed, 08 Aug 2012 17:09:47 +0100 ·
Hello,

Using Xymon 4.3.7, does anyone know if it is possible to create a graph
as an HTML image? That is, so that I can use '<IMG SRC...>' in a web
page.

I have had a look at 'showgraph.sh', but that seems to create a link to
a page which then contains just the graph. I want the graph/image, not a
link to it. Even using the '--save' option

Our old Big Brother/MRTG system created PNG images of various things
(which admittedly was a big drain on the system), and we could then
create web pages which simply loaded whatever graphs/images we wanted.
I'm now trying to do something similar but using Xymon/RRD.

Anyone any ideas about this?

(Current thoughts are perhaps to use PHP with rrdgraph to create the
image. However, I then have to fiddle with the format of the image
unless I can parse the graphs.cfg file.)


John.

-- 
John Horne                   Tel: +XX (X)XXXX XXXXXX
Plymouth University, UK      Fax: +XX (X)XXXX XXXXXX
list Ralph Mitchell · Wed, 8 Aug 2012 12:18:33 -0400 ·
showgraph.sh *does* produce a png image.  Click through the trends column,
click through a graph, look at the page source.  You'll see

     <img src="/xymon-cgi/showgraph.sh?host=server.domain.com
&color=.........>

Ralph Mitchell
quoted from John Horne


On Wed, Aug 8, 2012 at 12:09 PM, John Horne <user-e95f1ec2f147@xymon.invalid>wrote:
Hello,

Using Xymon 4.3.7, does anyone know if it is possible to create a graph
as an HTML image? That is, so that I can use '<IMG SRC...>' in a web
page.

I have had a look at 'showgraph.sh', but that seems to create a link to
a page which then contains just the graph. I want the graph/image, not a
link to it. Even using the '--save' option

Our old Big Brother/MRTG system created PNG images of various things
(which admittedly was a big drain on the system), and we could then
create web pages which simply loaded whatever graphs/images we wanted.
I'm now trying to do something similar but using Xymon/RRD.

Anyone any ideas about this?

(Current thoughts are perhaps to use PHP with rrdgraph to create the
image. However, I then have to fiddle with the format of the image
unless I can parse the graphs.cfg file.)


John.

--
John Horne                   Tel: +XX (X)XXXX XXXXXX
Plymouth University, UK      Fax: +XX (X)XXXX XXXXXX

list John Horne · Wed, 08 Aug 2012 17:33:01 +0100 ·
quoted from Ralph Mitchell
On Wed, 2012-08-08 at 12:18 -0400, Ralph Mitchell wrote:
showgraph.sh *does* produce a png image.  Click through the trends
column, click through a graph, look at the page source.  You'll see 
  <img src="/xymon-cgi/showgraph.sh?host=server.domain.com&color=....>
Doh! I had the 'img src' and the showgraph, but just didn't put the two
together!

Many thanks for that. Phew, that saves an awful lot of messing around.
quoted from Ralph Mitchell


John.

-- 
John Horne                   Tel: +XX (X)XXXX XXXXXX
Plymouth University, UK      Fax: +XX (X)XXXX XXXXXX
list Japheth Cleaver · Wed, 8 Aug 2012 10:43:11 -0700 (PDT) ·
quoted from Ralph Mitchell
On Wed, 2012-08-08 at 12:18 -0400, Ralph Mitchell wrote:
showgraph.sh *does* produce a png image.  Click through the trends
column, click through a graph, look at the page source.  You'll see
  <img src="/xymon-cgi/showgraph.sh?host=server.domain.com&color=....>
Doh! I had the 'img src' and the showgraph, but just didn't put the two
together!

Many thanks for that. Phew, that saves an awful lot of messing around.
Yep! Armed with that, it's not too difficult to script and pre-gen various
RRD graphs for reports and other purposes.

-jc