Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MRTG Question

Status
Not open for further replies.

TheStressFactor

IS-IT--Management
Sep 24, 2002
229
US
Hey All,

Was wondering if it was possible to customize MRTG at all. I have 5 routers at each of my sites. Id like to have one MRTG report that shows the daily 5 minute graph fo each of them rather than having to go into each report individually...I am trying mess around with the files but I cannot seem to get it to work...can this be done? If so, any guidance, direction, or info on how to do so would be greatly appreciated.

Thank you.

Patrick
 
You can create an index.html page and use the following code to make a page that your looking for.

<center>

<TD><DIV><B>"CS2 - Throughput" -- A.B.C.3</B></DIV>
<DIV><A HREF="A.B.C.3_1.html"><IMG BORDER=1 ALT="A.B.C.3 Traffic Graph" SRC="A.B.C.3_1-day.png"></A><BR>
<SMALL><!--#flastmod file="A.B.C.3_1.html" --></SMALL></DIV>
</TD>
</TR>

<TD><DIV><B>"CS2 - Throughput" -- A.B.C.3</B></DIV>
<DIV><A HREF="A.B.C.3_1.html"><IMG BORDER=1 ALT="A.B.C.3 Traffic Graph" SRC="A.B.C.3_1-day.png"></A><BR>
<SMALL><!--#flastmod file="A.B.C.3_1.html" --></SMALL></DIV>
</TD>
</TR>

</center>
 
Yes, I graph alot of items. CPU Use, Number Users logged onto VPN Concentrator, Number of VPN Management Sessions from Routers, Switches, etc. I also use it to log things like number of users logged onto IIS, CPU and Bandwidth Usage of Netware and Windows Servers. Pretty Much if theres an Accessable OID and you want to log it, you can.

All you have to do is find the SNMP Object ID's for what you want and write customized config file. Afterward call it against the mrtg binary.

Alter the X and Y sizes according to how big you want the graphs.

heres one I use to graph CPU Use.......

WorkDir: /var/Title[^]: CPU Usage (%) on System:
Options[_]: growright
RunAsDaemon: Yes

Target[CPU-1]: 1.3.6.1.4.1.9.2.1.56.0&1.3.6.1.4.1.9.2.1.56.0:SNMPCOMMUNITY@ROUTERNAME
MaxBytes[CPU-1]: 100
Title[CPU-1]: Cisco 2621XM - XXXXX Location
PageTop[CPU-1]: <H2>CPU Usage (%) on System: XXX.XXXX.com</H2>
Options[CPU-1]: gauge, nopercent, absolute
Unscaled[CPU-1]: dwmy
#Supress[CPU-1]:dwmy
XSize[CPU-1]: 380
YSize[CPU-1]: 100
YLegend[CPU-1]: CPU Usage (%)
#ShortLegend[CPU-1]: CPU Usage (%)
Legend1[CPU-1]: CPU Usage in Percent
#Legend2[CPU-1]:
#Legend3[CPU-1]:
#Legend4[CPU-1]:
LegendI[CPU-1]:
LegendO[CPU-1]:


I have a site like this on one of our our IntRAnet Servers. I got alot of my ideas from here: (click traffic monitoring). Basically if you want to write a page like this all you need to do is set up a web page and <img src> the mrtg image graphs you want from the stock page.

here's some other code

the site i frequent the most for stuff like this - GOOD GOOD

[afro]
-gC-
Good Luck
 
also just so you know when graphing i.e., '1.3.6.1.4.1.9.2.1.56.0 & 1.3.6.1.4.1.9.2.1.56.0' . The first one is "X" and the second is "Y". You can graph any 2 accessible values you wish. Just make you get acquainted with using 'snmpget' and 'snmpwalk' commands and you should get the hang of it in no time. I recommend only using Linux for this. I always use Red Hat with MRTG.
 
And to find the SNMP OID's, you can walk them using a tool like GetIf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top