1

i'm trying to find the way to create specific network usage.

I just added new subinterfaces (eth0:1, eth0:2) on my server, restarted net-snmpd but on cacti server only export the main interface:

Data Query [SNMP - Interface Statistics]    
Index   Status  Description     Name (IF-MIB)   Alias (IF-MIB)  Type    Speed   High Speed  Hardware Address    IP Address  
1   Up  lo  lo      24  10000000    10      127.0.0.1   
2   Up  eth0    eth0        6   0   0   00:16:xX:XX:XX:XX   10.10.10.2

Also, searched on Cacti forums but found nothing.

Anyone can give me a hand on this? Thanks in advance

reiven
  • 11
  • 2

1 Answers1

1

snmpd does not export any metrics for subinterfaces. I'm pretty sure linux doesn't even record those metrics. Observe:

$ ifconfig -a
<cut non-eth1 data>
eth1      Link encap:Ethernet  HWaddr E4:11:5B:E0:14:5C  
          inet addr:87.233.215.178  Bcast:87.233.215.191  Mask:255.255.255.240
          inet6 addr: fe80::e611:5bff:fee0:145c/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:909395198 errors:5 dropped:0 overruns:0 frame:0
          TX packets:939665657 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:738107052290 (687.4 GiB)  TX bytes:799183242768 (744.2 GiB)

eth1:179  Link encap:Ethernet  HWaddr E4:11:5B:E0:14:5C  
          inet addr:87.233.215.179  Bcast:87.233.215.191  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1:180  Link encap:Ethernet  HWaddr E4:11:5B:E0:14:5C  
          inet addr:87.233.215.180  Bcast:87.233.215.191  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1:181  Link encap:Ethernet  HWaddr E4:11:5B:E0:14:5C  
          inet addr:87.233.215.181  Bcast:87.233.215.191  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth1:182  Link encap:Ethernet  HWaddr E4:11:5B:E0:14:5C  
          inet addr:87.233.215.182  Bcast:87.233.215.191  Mask:255.255.255.240
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1


$ snmpwalk -v3 -x AES -X ........ -u ........ -a SHA -A ........ -l authPriv gateway-machine IF-MIB::ifDescr
IF-MIB::ifDescr.1 = STRING: lo
IF-MIB::ifDescr.2 = STRING: eth0
IF-MIB::ifDescr.3 = STRING: eth1

No packet counters in the ifconfig output for the :179-:182 devices, no interfaces listed in the snmpwalk output.

Dennis Kaarsemaker
  • 19,277
  • 2
  • 44
  • 70