I have done it by naming my MRTG graphs by IP address.   I then pass the IP
address variable from the What's UP ASP to a small javascript file which
then shows the MRTG graph inline with the Whats Up device detail webpage.

The key is naming the MRTG graphs by Ip so that it can be dynamic in What's
UP.
Here is the code I placed in the devicedetails.asp  whereever I want the
graphs to appear:

<script language=javascript>
var ip="<%DEVICE% IP_ADDRESS>";
var mrtgname=ip;
var user1 = "<%USER% USER_NAME>";
</script>
<script type="text/javascript" src="mrtg.js"></script>

The MRTG.JS contains something like:

var html='</td></tr>';
html += '<tr><Td><font face=Arial size=3><b>Ethernet Traffic (<font
color=green>In</font>/<font
color=blue>Out</font>)</b></font></td></tr><tr><td>'
html +='<a href=http://localhost/'+user1+'/graphs/wireless/Eth/' +mrtgname+
'.html target=_blank>';
html +='<IMG VSPACE=10 WIDTH=500 HEIGHT=135 border=0 ALIGN=TOP
SRC="http://localhost/'+user1+'/graphs/wireless/eth/'+mrtgname+'.png"
ALT="day">';
html +='</a></td></tr>';
document.write(html);


Hope it helps.

Thanks,
Steve Warnock
Advanced Computer Connections
419-668-4080


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
[EMAIL PROTECTED]
Sent: Wednesday, August 27, 2003 4:02 PM
To: [EMAIL PROTECTED]
Subject: [WhatsUp Forum] MRTG Daily graph on MapDetail.ASP


I would like to include an MRTG graph for selected devices,  viewable from
the web gui.

If a viewer selects a device that has an MRTG graph available I would like
it to include the 'daily' graph only somewhere on the Mapdetail.asp page -
preferably before the log extract section. The MRTG graphs reside on the
same server.

Any codehound know of an easy way to do this?

Thanks!

Scott

Please visit http://www.ipswitch.com/support/mailing-lists.html
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/


Please visit http://www.ipswitch.com/support/mailing-lists.html 
to be removed from this list.

An Archive of this list is available at:
http://www.mail-archive.com/whatsup_forum%40list.ipswitch.com/

Reply via email to