-----Original Message-----
From: Anthony Valuikas [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 4:58 AM
Hmm... Now I haven't thought of using WUG to generate the MRTG CFG's. Very
nice idea!

Care to share those thoughts and work progress so far? Maybe myself and a
few other might find a way around that. Kind of like white boarding on the
forum... :>:>

------------------------------------------------------------------

So here is the base of my work on this project.  

The following code would create the very basic config for MRTG.  Of course
we would want a more detailed config (this is just a start, and where I got
stopped by WUG.   This code would be inside a list of all services on all
devices on all loaded maps.

        <%INCLUDE% mrtgconfigheader.txt>
        <%IF% MATCH (%SERVICE_STATISTICS% NAME, INTERFACE)>
        Target[<%MAP% NAME><%DEVICE% UNIQUE_ID>]:
<%SERVICE_STATISTICS% ARGUMENT>:<%DEVICE% READ_COMMUNITY>@<%DEVICE%
HOSTNAME>
        MaxBytes[<%MAP% NAME><%DEVICE% UNIQUE_ID>]: 1250000     
        PageTop[<%MAP% NAME><%DEVICE% UNIQUE_ID>]: <%DEVICE% DISPLAY_NAME>

        <%ENDIF%>

This would test the service to see if it is an interface (this currently
doesn't work because WUG returns "Interface(1)".  Then it creates the Target
config line for MRTG.  This also doesn't work because WUG doesn't return the
service argument.  So there is no way to get the interface number for MRTG
to poll.  

I suppose I could use the IP address for the interface, but then I would
need a separate device for each interface on my routers and switches.  That
would make the maps real hard to read (big and messy), and that wouldn't
work for the switches that have 1 IP for each switch.

If you can find a way to do this it would help a lot.  

The plan was to create this asp file then use a command line http get
program (curl) to download the file, save it as mrtg.cfg and then run MRTG
from that file.    Changes in WUG would automatically be used by MRTG.  

To take this further, you could test to see if a service was SNMP and use
the OID in the service definition to graph more then just interfaces. But
again WUG doesn't give access to these variables (that already exist) from
the web interface. 


Jeff Cook
IT Technician
Whatcom Educational Credit Union
[EMAIL PROTECTED]

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