[mrtg] SNMP/MRTG/Linux
Evelio
evelio.martinez at testanet.com
Wed Aug 21 18:14:34 MEST 2002
Jan sorry to bother you again.
I have a question about SNMP/MRTG ...
If I execute this command against a Linux host:
snmpwalk -v2c x.y.w.z public interfaces
I get the following:
interfaces = No more variables left in this MIB View
The same command over a Windows 2000 server gives me this result:
interfaces.ifNumber.0 = 2
interfaces.ifTable.ifEntry.ifIndex.1 = 1
interfaces.ifTable.ifEntry.ifIndex.16777219 = 16777219
interfaces.ifTable.ifEntry.ifDescr.1 = MS TCP Loopback interface
interfaces.ifTable.ifEntry.ifDescr.16777219 = 3Com EtherLink PCI
interfaces.ifTable.ifEntry.ifType.1 = softwareLoopback(24)
interfaces.ifTable.ifEntry.ifType.16777219 = ethernetCsmacd(6)
interfaces.ifTable.ifEntry.ifMtu.1 = 32768
interfaces.ifTable.ifEntry.ifMtu.16777219 = 1500
interfaces.ifTable.ifEntry.ifSpeed.1 = Gauge32: 10000000
interfaces.ifTable.ifEntry.ifSpeed.16777219 = Gauge32: 100000000
interfaces.ifTable.ifEntry.ifPhysAddress.1 =
interfaces.ifTable.ifEntry.ifPhysAddress.16777219 = 0:4:76:e:e2:31
interfaces.ifTable.ifEntry.ifAdminStatus.1 = up(1)
interfaces.ifTable.ifEntry.ifAdminStatus.16777219 = up(1)
interfaces.ifTable.ifEntry.ifOperStatus.1 = up(1)
interfaces.ifTable.ifEntry.ifOperStatus.16777219 = up(1)
interfaces.ifTable.ifEntry.ifLastChange.1 = Timeticks: (0) 0:00:00.00
interfaces.ifTable.ifEntry.ifLastChange.16777219 = Timeticks: (0) 0:00:00.00
interfaces.ifTable.ifEntry.ifInOctets.1 = Counter32: 464482986
interfaces.ifTable.ifEntry.ifInOctets.16777219 = Counter32: 1372870024
interfaces.ifTable.ifEntry.ifInUcastPkts.1 = Counter32: 7626848
interfaces.ifTable.ifEntry.ifInUcastPkts.16777219 = Counter32: 20832858
interfaces.ifTable.ifEntry.ifInNUcastPkts.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInNUcastPkts.16777219 = Counter32: 100584
interfaces.ifTable.ifEntry.ifInDiscards.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInDiscards.16777219 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInErrors.16777219 = Counter32: 0
interfaces.ifTable.ifEntry.ifInUnknownProtos.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifInUnknownProtos.16777219 = Counter32: 70432
interfaces.ifTable.ifEntry.ifOutOctets.1 = Counter32: 464482986
interfaces.ifTable.ifEntry.ifOutOctets.16777219 = Counter32: 3988513735
interfaces.ifTable.ifEntry.ifOutUcastPkts.1 = Counter32: 7626848
interfaces.ifTable.ifEntry.ifOutUcastPkts.16777219 = Counter32: 23619389
interfaces.ifTable.ifEntry.ifOutNUcastPkts.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutNUcastPkts.16777219 = Counter32: 8160
interfaces.ifTable.ifEntry.ifOutDiscards.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutDiscards.16777219 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.1 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutErrors.16777219 = Counter32: 0
interfaces.ifTable.ifEntry.ifOutQLen.1 = Gauge32: 0
interfaces.ifTable.ifEntry.ifOutQLen.16777219 = Gauge32: 0
interfaces.ifTable.ifEntry.ifSpecific.1 = OID: .ccitt.zeroDotZero
interfaces.ifTable.ifEntry.ifSpecific.16777219 = OID: .ccitt.zeroDotZero
Does this mean that ...?
1) By default, Linux host is not configured to give me these results.
2) I do have to configure snmpd.conf to obtain the same results. For
example, in
case of ifOutOctets and ifInOctets, do I have to use some script to get
them ?
grep eth0 /proc/net/dev|awk '{ print $1}' and map it to a MIB. ??
3) It is not ok the accesibility level in snmpd.conf.
4) None of the above. I do not get the point.
This is the snmpd.conf (UCD-snmp version: 4.1.1) that I have now:
com2sec paranoid default public
group MyROSystem v1 paranoid
group MyROSystem v2c paranoid
group MyROSystem usm paranoid
group MyROGroup v1 readonly
group MyROGroup v2c readonly
group MyROGroup usm readonly
group MyRWGroup v1 readwrite
group MyRWGroup v2c readwrite
group MyRWGroup usm readwrite
view all included .1 80
view system included .iso.org.dod.internet.mgmt.mib-2.system
access MyROSystem "" any noauth exact system none none
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all none
How do I extend the agent to get interfaces results?
Any suggestions?
Thanks in advance
------------
Evelio Martínez
--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive http://www.ee.ethz.ch/~slist/mrtg
FAQ http://faq.mrtg.org Homepage http://www.mrtg.org
WebAdmin http://www.ee.ethz.ch/~slist/lsg2.cgi
More information about the mrtg
mailing list