05-19-2005 05:46 AM
Folks,
I have a cisco 3550 EMI switch sending snmp traps to a snmp monitoring device. I have been told to use MRTG as well to monitor port usage of the ports. MRTG is running on a different server. Is it possible for me to configure SNMP on the router in a way that it sends traps to 2 devices. Also, how would MRTG know what trap to look for??
Thanks
05-19-2005 05:50 AM
not sure about MRTG config, but the 3550 does allow more than one trap recipient
the command starts with (you can have more than one):
snmp-server host
05-19-2005 05:57 AM
Hi,
MRTG is not a trap receiver as such. It works by polling a device for SNMP values, by default it pulls the ifInOctets/ifOutOctets counters for all discovered interfaces on a device.
You can however configure it to monitor any SNMP value on a device if you know the OID.
This is achieved by editing the config files created by MRTG, for example the following config file monitors CPU usage on a router and runs a script that sends an email should the utilisation reach 90%
# CPU load % (5 minute average show processes cpu)
Target[RouterA_CPU]: 1.3.6.1.4.1.9.2.1.58.0&1.3.6.1.4.1.9.2.1.58.0:@RouterA
ShortLegend[RouterA_CPU]: %
MaxBytes[RouterA_CPU_CPU]: 100
Options[RouterA_CPU]: gauge,growright,nobanner,noborder,transparent
Unscaled[RouterA_CPU]: dwmy
WithPeak[RouterA_CPU]: wmy
ThreshMaxO[RouterA_CPU]: 90
ThreshProgO[RouterA_CPU]: /usr/bin/CUSTOM/MRTG_CPU_Alert.sh
Title[RouterA_CPU]: CPU Utilisation (%)
YLegend[RouterA_CPU]: CPU Utilisation
Legend1[RouterA_CPU]: CPU Utilisation in % (Load)
Legend2[RouterA_CPU]: CPU Utilisation in % (Load)
Legend3[RouterA_CPU]:
Legend4[RouterA_CPU]:
LegendI[RouterA_CPU]:
LegendO[RouterA_CPU]:
So to answer your questions to only need to have SNMP configured on your devices with read community strings for MRTG to work.
HTH
Paddy
05-19-2005 06:42 AM
Paddy,
Thanks a lot for your response. I would highly appreciate if you could help me. Here is the exiting configuration of the router, it is already configured to send SNMP traps to some SNMP monitoring device. My job is to use MRTG to monitor port usage and at the same time do not disrupt the snmp trap process the router is already running so that it can send the specified traps to the snmp monitoring device and also send me MRTG stats.
snmp-server engineID local xxxx
snmp-server community nortel RO
snmp-server community drats RW
snmp-server community public RO
snmp-server trap-source Loopback0
snmp-server chassis-id SAL0731HQRV
snmp-server enable traps snmp
snmp-server enable traps casa
snmp-server enable traps channel
snmp-server enable traps isdn call-information
snmp-server enable traps isdn layer2
snmp-server enable traps hsrp
snmp-server enable traps config
snmp-server enable traps entity
snmp-server enable traps envmon
snmp-server enable traps bgp
snmp-server enable traps rsvp
snmp-server enable traps frame-relay
snmp-server enable traps syslog
snmp-server enable traps rtr
snmp-server enable traps dlsw
snmp-server host 192.x.52.101 nortel
*snmp-server host 10.122.100.105 public*
Can i add this line for MRTG??? I hope this will not effect 192.x.52.101 from getting all the traps????
Thanks
05-19-2005 06:52 AM
Hi,
Yeah you can very well add that line, infact in my own setup, we were initially having to SNMP Managers, (we were migrating from one SNMP Mgr to the other one).
Also, the MRTG must be used as an SNMP-Server Host, otherwise the Router / Switch will ignore all the polling done by the MRTG Server.
Hope that this solves your problem.
Kind Regards,
Wilson Samuel
05-19-2005 07:03 AM
Hi,
You don't need to add anything to your router as MRTG does not collect traps, it only requests information using SNMP gets so your current config is correct, just make sure you add your community string to your MRTG config.
"snmp-server host 10.122.100.105 public" means send traps to 10.122.100.105 using a communtity string of public. So unless your MRTG server has Openview or CiscoWorks or similar install, you do not need to configure this.
Have a look here for a fuller description
Thanks
Paddy
05-19-2005 07:20 AM
thanks you very much for answering my question. So all i need is community value on the router that should match on MRTG.
I am having the stange problem now, where I specify the community string in MRTG, it accepts and runs the script but hangs at the following stage:
--base: walking if speed
any ideas why the commander program hangs when it reaches this stage, i am using the commerical version of MRTG.
Thanks
05-19-2005 07:46 AM
I haven't seen this before.
Might be worth doing a debug on your device ("debug snmp packets") to see what's happening when it fails, does your application successfully walk anything?
Also, do you need to load all the MIBs into your application as if the application is using names and not OIDs to walk your device it might not know what ifspeed refers to.
Thanks
Paddy
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide