nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

mrtg configuration

This is a discussion on mrtg configuration within the Linux software forums, part of the Linux Getting Started category; Hi all, 1. Does anyone know how to configure mrtg to exclude monitoring some interfaces on the switch? My switches ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 02-22-2006, 07:17 PM
Junior Member
User
 
Join Date: Feb 2006
Posts: 6
Rep Power: 0
hart
Default mrtg configuration

Hi all,
1. Does anyone know how to configure mrtg to exclude monitoring some interfaces on the switch?
My switches have 24 ports, I want mrtg to monitor only fastethernet 0/1interfaces on every swicth. I do not want to see on web page all the interfaces (24) of all switches (32) :cry:
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 02-23-2006, 12:12 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

You can edit mrtg configuration file to remove all unwanted interfaces. Each config starts with Interface 1, Interface 2 etc. For example here is line for interace # 4 on 192.168.1.254 (just remove all following line:

Code:
Target[192.168.1.254_4]: 4:public@192.168.1.254:
SetEnv[192.168.1.254_4]: MRTG_INT_IP="" MRTG_INT_DESCR="nas0"
MaxBytes[192.168.1.254_4]: 1250000
Title[192.168.1.254_4]: Traffic Analysis for 4 --
PageTop[192.168.1.254_4]: <H1>Traffic Analysis for 4 -- </H1>
 <TABLE>
   <TR><TD>System:</TD>     <TD> in </TD></TR>
   <TR><TD>Maintainer:</TD> <TD></TD></TR>
   <TR><TD>Description:</TD><TD>nas0  </TD></TR>
   <TR><TD>ifType:</TD>     <TD>ethernetCsmacd (6)</TD></TR>
   <TR><TD>ifName:</TD>     <TD></TD></TR>
   <TR><TD>Max Speed:</TD>  <TD>1250.0 kBytes/s</TD></TR>
 </TABLE>
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #3 (permalink)  
Old 02-23-2006, 04:55 PM
Junior Member
User
 
Join Date: Feb 2006
Posts: 6
Rep Power: 0
hart
Default

Thanks for help. I managed with one interface.
I have another question: how can I configure mrtg to monitor the cpu and memory usage of Cisco switch?
Reply With Quote
  #4 (permalink)  
Old 02-23-2006, 05:39 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

First find out the OIDs used by Cisco for CPU and Memoey. You can get list from ftp.cisco.com.

Then locate CPU related OID and test it using nmpwalk command:
Code:
snmpwalk -v1 -c public   SWITCH-IP   OID-TO-POLL-CPU-INFO
Once confirmed the CPU OID is correct edit /etc/mrtg.conf (or your mrtg.conf file) to create graph, here is entry for my CPU monitoring from Router:

Code:
Target[16-CPU]: 1.3.6.1.4.1.9.2.1.57.0&1.3.6.1.4.1.9.2.1.57.0:public@172.16.1.222
MaxBytes[16-CPU]: 100
Title[16-CPU]: Router CPU Load 
PageTop[16-CPU]: <h1>Router CPU Load </h1>
Unscaled[16-CPU]: ymwd
YLegend[16-CPU]: Utilization %
ShortLegend[16-CPU]: %
LegendI[16-CPU]: CPU
LegendO[16-CPU]: 
Options[16-CPU]: gauge,growright
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #5 (permalink)  
Old 02-24-2006, 01:42 PM
Junior Member
User
 
Join Date: Feb 2006
Posts: 6
Rep Power: 0
hart
Default

Thanks I will try:)
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
MRTG help Pili Getting started tutorials 0 12-17-2007 06:20 PM
mrtg not showing graphs sajith Getting started tutorials 2 07-13-2007 12:09 PM
Will MRTG do this?? kartheekpn Linux software 3 05-10-2005 07:18 PM
MRTG sonaikar Linux software 1 05-07-2005 05:16 PM
MRTG skipping webupdates nathan86 Linux software 2 03-29-2005 05:56 PM


All times are GMT +5.5. The time now is 02:58 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36