Generating graphs for a remote webpage

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

Post Reply
geebzor
Posts: 6
Joined: Tue May 10, 2011 2:00 am

Generating graphs for a remote webpage

Post by geebzor »

Hello,

We are currently using Cacti and it's working well.

What we'd like to do is embed a graph into a usage meter.

Using the default graph exporter takes too long and loads the server too much.
It takes 2.5 mins hammering the host server to produce these graphs every 5 mins.
EXPORT STATS: ExportDate:2011-05-10_17:02:19 ExportDuration:128.2144 TotalGraphsExported:3234

Is there another way to do this ?
How would I generate a graph when required and embed this in an html page ?

Thanks for your time :)
noname
Cacti Guru User
Posts: 1566
Joined: Thu Aug 05, 2010 2:04 am
Location: Japan

Re: Generating graphs for a remote webpage

Post by noname »

Try these steps:

1) Enable guest access
Console -> Settings -> Authentication
- Guest User : guest

Console -> User Management -> guest
- Enabled : on
- Realm Permissions : View Graphs = on

2) Embed graph in remote webpage as follows
<img src="http://server/cacti/graph_image.php?local_graph_id=(A)&rra_id=(B)&graph_width=(C)&graph_height=(D)&graph_nolegend=(E)">
  • (A) graph ID
  • (B) 1=Daily, 2=Weekly, 3=Monthly, 4=Yearly, 5=Hourly
  • (C),(D) graph width/height [NOTICE: This size is for plot area, not for whole image]
  • (E) true (or blank)
geebzor
Posts: 6
Joined: Tue May 10, 2011 2:00 am

Re: Generating graphs for a remote webpage

Post by geebzor »

Thank you very much, works perfect :)
danger89
Posts: 4
Joined: Wed Jul 20, 2011 7:29 am

Re: Generating graphs for a remote webpage

Post by danger89 »

Thanks I was searching for this for about 3 days :roll: . Thanks again!!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest